From 4c471a6042bee8c5a5500e818d0f0a3f245c27d3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 3 Oct 2023 17:44:40 +0000 Subject: [PATCH] CodeGen from PR 24949 in Azure/azure-rest-api-specs Merge 5d8f25172f5df54a2c972532646a39d716a944a5 into 7dc72e8b070d449d29e2d679c219914637cdbfa5 --- .../CHANGELOG.md | 4 +- .../README.md | 49 +- .../SAMPLE.md | 5457 +++++++++++++---- .../pom.xml | 11 +- .../MachineLearningManager.java | 354 +- ...java => AzureMachineLearningServices.java} | 137 +- .../fluent/CodeVersionsClient.java | 126 + .../fluent/ComponentVersionsClient.java | 80 + .../fluent/DataVersionsClient.java | 80 + .../fluent/EnvironmentVersionsClient.java | 80 + .../fluent/FeaturesClient.java | 110 + .../fluent/FeaturesetContainersClient.java | 216 + .../fluent/FeaturesetVersionsClient.java | 338 + .../FeaturestoreEntityContainersClient.java | 226 + .../FeaturestoreEntityVersionsClient.java | 252 + .../machinelearning/fluent/JobsClient.java | 9 +- .../ManagedNetworkProvisionsClient.java | 78 + .../ManagedNetworkSettingsRulesClient.java | 209 + .../fluent/ModelVersionsClient.java | 80 + .../fluent/OnlineEndpointsClient.java | 4 +- .../fluent/OperationsClient.java | 10 +- .../fluent/RegistriesClient.java | 295 + .../fluent/RegistryCodeContainersClient.java | 198 + .../fluent/RegistryCodeVersionsClient.java | 272 + .../RegistryComponentContainersClient.java | 207 + .../RegistryComponentVersionsClient.java | 238 + .../fluent/RegistryDataContainersClient.java | 201 + .../fluent/RegistryDataReferencesClient.java | 55 + .../fluent/RegistryDataVersionsClient.java | 279 + .../RegistryEnvironmentContainersClient.java | 210 + .../RegistryEnvironmentVersionsClient.java | 241 + .../fluent/RegistryModelContainersClient.java | 201 + .../fluent/RegistryModelVersionsClient.java | 283 + .../fluent/WorkspacesClient.java | 7 +- .../fluent/models/AmlOperationInner.java | 106 - .../fluent/models/FeatureInner.java | 78 + .../models/FeaturesetContainerInner.java | 79 + ...eaturesetVersionBackfillResponseInner.java | 51 + .../fluent/models/FeaturesetVersionInner.java | 79 + .../FeaturestoreEntityContainerInner.java | 79 + .../FeaturestoreEntityVersionInner.java | 79 + .../GetBlobReferenceSasResponseDtoInner.java | 55 + .../ManagedNetworkProvisionStatusInner.java | 77 + .../models/ManagedNetworkSettingsInner.java | 135 + .../fluent/models/OperationInner.java | 127 + .../OutboundRuleBasicResourceInner.java | 79 + .../models/PendingUploadResponseDtoInner.java | 108 + .../fluent/models/RegistryInner.java | 339 + ...ryPrivateEndpointConnectionProperties.java | 140 + .../fluent/models/RegistryProperties.java | 225 + .../fluent/models/WorkspaceInner.java | 47 + .../models/WorkspacePropertiesInner.java | 59 + .../WorkspacePropertiesUpdateParameters.java | 31 + .../fluent/models/package-info.java | 2 +- .../machinelearning/fluent/package-info.java | 2 +- .../implementation/AmlOperationImpl.java | 42 - ... AzureMachineLearningServicesBuilder.java} | 42 +- ... => AzureMachineLearningServicesImpl.java} | 282 +- .../BatchDeploymentsClientImpl.java | 28 +- .../BatchEndpointsClientImpl.java | 25 +- .../implementation/CodeContainerImpl.java | 42 +- .../CodeContainersClientImpl.java | 18 +- .../implementation/CodeContainersImpl.java | 121 +- .../implementation/CodeVersionImpl.java | 61 +- .../CodeVersionsClientImpl.java | 641 +- .../implementation/CodeVersionsImpl.java | 204 +- .../ComponentContainerImpl.java | 42 +- .../ComponentContainersClientImpl.java | 18 +- .../ComponentContainersImpl.java | 122 +- .../implementation/ComponentVersionImpl.java | 47 +- .../ComponentVersionsClientImpl.java | 365 +- .../implementation/ComponentVersionsImpl.java | 165 +- .../implementation/ComputesClientImpl.java | 38 +- .../implementation/DataContainerImpl.java | 36 +- .../DataContainersClientImpl.java | 18 +- .../implementation/DataContainersImpl.java | 121 +- .../implementation/DataVersionBaseImpl.java | 54 +- .../DataVersionsClientImpl.java | 363 +- .../implementation/DataVersionsImpl.java | 165 +- .../implementation/DatastoresClientImpl.java | 31 +- .../EnvironmentContainerImpl.java | 42 +- .../EnvironmentContainersClientImpl.java | 18 +- .../EnvironmentContainersImpl.java | 122 +- .../EnvironmentVersionImpl.java | 47 +- .../EnvironmentVersionsClientImpl.java | 366 +- .../EnvironmentVersionsImpl.java | 165 +- .../implementation/FeatureImpl.java | 50 + .../implementation/FeaturesClientImpl.java | 792 +++ .../implementation/FeaturesImpl.java | 113 + .../FeaturesetContainerImpl.java | 144 + .../FeaturesetContainersClientImpl.java | 1256 ++++ .../FeaturesetContainersImpl.java | 212 + ...FeaturesetVersionBackfillResponseImpl.java | 40 + .../implementation/FeaturesetVersionImpl.java | 160 + .../FeaturesetVersionsClientImpl.java | 1812 ++++++ .../FeaturesetVersionsImpl.java | 280 + .../FeaturestoreEntityContainerImpl.java | 144 + ...eaturestoreEntityContainersClientImpl.java | 1285 ++++ .../FeaturestoreEntityContainersImpl.java | 225 + .../FeaturestoreEntityVersionImpl.java | 149 + .../FeaturestoreEntityVersionsClientImpl.java | 1456 +++++ .../FeaturestoreEntityVersionsImpl.java | 260 + .../GetBlobReferenceSasResponseDtoImpl.java | 34 + .../implementation/JobsClientImpl.java | 73 +- .../implementation/JobsImpl.java | 5 +- .../ManagedNetworkProvisionStatusImpl.java | 38 + .../ManagedNetworkProvisionsClientImpl.java | 401 ++ .../ManagedNetworkProvisionsImpl.java | 57 + .../ManagedNetworkSettingsImpl.java | 61 + ...ManagedNetworkSettingsRulesClientImpl.java | 1129 ++++ .../ManagedNetworkSettingsRulesImpl.java | 191 + .../implementation/ModelContainerImpl.java | 42 +- .../ModelContainersClientImpl.java | 18 +- .../implementation/ModelContainersImpl.java | 121 +- .../implementation/ModelVersionImpl.java | 61 +- .../ModelVersionsClientImpl.java | 363 +- .../implementation/ModelVersionsImpl.java | 165 +- .../OnlineDeploymentsClientImpl.java | 36 +- .../OnlineEndpointsClientImpl.java | 42 +- .../implementation/OperationImpl.java | 51 + .../implementation/OperationsClientImpl.java | 44 +- .../implementation/OperationsImpl.java | 16 +- .../OutboundRuleBasicResourceImpl.java | 144 + .../PendingUploadResponseDtoImpl.java | 43 + .../PrivateEndpointConnectionsClientImpl.java | 23 +- .../PrivateLinkResourcesClientImpl.java | 9 +- .../implementation/QuotasClientImpl.java | 11 +- .../implementation/RegistriesClientImpl.java | 1703 +++++ .../implementation/RegistriesImpl.java | 187 + .../RegistryCodeContainersClientImpl.java | 1115 ++++ .../RegistryCodeContainersImpl.java | 190 + .../RegistryCodeVersionsClientImpl.java | 1474 +++++ .../RegistryCodeVersionsImpl.java | 264 + ...RegistryComponentContainersClientImpl.java | 1144 ++++ .../RegistryComponentContainersImpl.java | 190 + .../RegistryComponentVersionsClientImpl.java | 1281 ++++ .../RegistryComponentVersionsImpl.java | 226 + .../RegistryDataContainersClientImpl.java | 1125 ++++ .../RegistryDataContainersImpl.java | 191 + .../RegistryDataReferencesClientImpl.java | 285 + .../RegistryDataReferencesImpl.java | 75 + .../RegistryDataVersionsClientImpl.java | 1527 +++++ .../RegistryDataVersionsImpl.java | 266 + ...gistryEnvironmentContainersClientImpl.java | 1165 ++++ .../RegistryEnvironmentContainersImpl.java | 191 + ...RegistryEnvironmentVersionsClientImpl.java | 1326 ++++ .../RegistryEnvironmentVersionsImpl.java | 233 + .../implementation/RegistryImpl.java | 308 + .../RegistryModelContainersClientImpl.java | 1127 ++++ .../RegistryModelContainersImpl.java | 191 + .../RegistryModelVersionsClientImpl.java | 1622 +++++ .../RegistryModelVersionsImpl.java | 284 + .../implementation/SchedulesClientImpl.java | 20 +- .../implementation/UsagesClientImpl.java | 8 +- .../VirtualMachineSizesClientImpl.java | 6 +- .../WorkspaceConnectionsClientImpl.java | 18 +- .../WorkspaceFeaturesClientImpl.java | 11 +- .../implementation/WorkspaceImpl.java | 31 + .../WorkspacePropertiesImpl.java | 16 + .../implementation/WorkspacesClientImpl.java | 130 +- .../implementation/WorkspacesImpl.java | 13 +- .../implementation/package-info.java | 2 +- .../AccountKeyDatastoreCredentials.java | 2 +- .../machinelearning/models/AcrDetails.java | 82 + .../machinelearning/models/ActionType.java | 44 + .../machinelearning/models/AllFeatures.java | 29 + .../machinelearning/models/AllNodes.java | 29 + .../machinelearning/models/AmlOperation.java | 38 - .../models/AmlOperationDisplay.java | 128 - .../models/AmlOperationListResult.java | 55 - .../models/AmlTokenComputeIdentity.java | 29 + .../models/AnonymousAccessCredential.java | 29 + .../machinelearning/models/ArmResourceId.java | 59 + .../models/AssetProvisioningState.java | 59 + .../machinelearning/models/AutoMLJob.java | 29 + .../models/AzureBlobDatastore.java | 52 + .../models/AzureDataLakeGen1Datastore.java | 52 + .../models/AzureDataLakeGen2Datastore.java | 52 + .../models/AzureDatastore.java | 76 + .../models/AzureDevOpsWebhook.java | 36 + .../models/AzureFileDatastore.java | 52 + .../models/BatchDeployment.java | 13 + .../machinelearning/models/BatchEndpoint.java | 13 + .../machinelearning/models/BindOptions.java | 102 + .../BlobReferenceForConsumptionDto.java | 108 + .../models/CategoricalDataDriftMetric.java | 50 + .../CategoricalDataDriftMetricThreshold.java | 72 + .../models/CategoricalDataQualityMetric.java | 50 + ...CategoricalDataQualityMetricThreshold.java | 72 + .../CategoricalPredictionDriftMetric.java | 52 + ...goricalPredictionDriftMetricThreshold.java | 72 + .../CertificateDatastoreCredentials.java | 2 +- .../machinelearning/models/CodeContainer.java | 13 +- .../models/CodeContainerProperties.java | 16 + .../models/CodeContainers.java | 54 +- .../machinelearning/models/CodeVersion.java | 40 +- .../models/CodeVersionProperties.java | 15 + .../machinelearning/models/CodeVersions.java | 103 +- .../machinelearning/models/CommandJob.java | 29 + .../models/ComponentContainer.java | 13 +- .../models/ComponentContainerProperties.java | 16 + .../models/ComponentContainers.java | 55 +- .../models/ComponentVersion.java | 15 +- .../models/ComponentVersionProperties.java | 15 + .../models/ComponentVersions.java | 69 +- .../models/ComputeInstanceProperties.java | 60 +- .../models/ComputeRecurrenceFrequency.java | 56 + .../models/ComputeRecurrenceSchedule.java | 143 + .../models/ComputeResource.java | 11 + .../models/ComputeStartStopSchedule.java | 18 +- .../models/ComputeTriggerType.java | 47 + .../models/ComputeWeekDay.java | 62 + .../models/CreateMonitorAction.java | 67 + .../machinelearning/models/Cron.java | 111 + .../models/CustomMetricThreshold.java | 89 + .../models/CustomMonitoringSignal.java | 195 + .../machinelearning/models/CustomService.java | 244 + .../models/DataAvailabilityStatus.java | 53 + .../machinelearning/models/DataContainer.java | 13 +- .../models/DataContainers.java | 54 +- .../models/DataDriftMetricThresholdBase.java | 68 + .../models/DataDriftMonitoringSignal.java | 239 + .../DataQualityMetricThresholdBase.java | 68 + .../models/DataQualityMonitoringSignal.java | 241 + .../models/DataReferenceCredential.java | 38 + .../models/DataReferenceCredentialType.java | 53 + .../models/DataVersionBase.java | 38 +- .../models/DataVersionBaseProperties.java | 9 +- .../machinelearning/models/DataVersions.java | 69 +- .../machinelearning/models/Datastore.java | 9 + .../models/DestinationAsset.java | 102 + .../machinelearning/models/Docker.java | 89 + .../models/DockerCredential.java | 82 + .../models/EmailNotificationEnableType.java | 50 + .../machinelearning/models/Endpoint.java | 160 + .../EndpointServiceConnectionStatus.java | 53 + .../models/EnvironmentContainer.java | 13 +- .../EnvironmentContainerProperties.java | 16 + .../models/EnvironmentContainers.java | 55 +- .../models/EnvironmentVariable.java | 121 + .../models/EnvironmentVariableType.java | 48 + .../models/EnvironmentVersion.java | 16 +- .../models/EnvironmentVersionProperties.java | 50 +- .../models/EnvironmentVersions.java | 69 +- .../machinelearning/models/Feature.java | 53 + ...atureAttributionDriftMonitoringSignal.java | 218 + .../models/FeatureAttributionMetric.java | 45 + .../FeatureAttributionMetricThreshold.java | 90 + .../models/FeatureDataType.java | 65 + .../models/FeatureImportanceMode.java | 47 + .../models/FeatureImportanceSettings.java | 76 + .../models/FeatureProperties.java | 100 + .../FeatureResourceArmPaginatedResult.java | 81 + .../machinelearning/models/FeatureSubset.java | 65 + .../machinelearning/models/FeatureWindow.java | 77 + .../machinelearning/models/Features.java | 102 + .../models/FeaturesetContainer.java | 174 + .../models/FeaturesetContainerProperties.java | 70 + ...etContainerResourceArmPaginatedResult.java | 83 + .../models/FeaturesetContainers.java | 160 + .../models/FeaturesetSpecification.java | 50 + .../models/FeaturesetVersion.java | 198 + .../FeaturesetVersionBackfillRequest.java | 271 + .../FeaturesetVersionBackfillResponse.java | 26 + .../models/FeaturesetVersionProperties.java | 188 + ...esetVersionResourceArmPaginatedResult.java | 83 + .../models/FeaturesetVersions.java | 213 + .../models/FeaturestoreEntityContainer.java | 174 + ...FeaturestoreEntityContainerProperties.java | 70 + ...tyContainerResourceArmPaginatedResult.java | 84 + .../models/FeaturestoreEntityContainers.java | 162 + .../models/FeaturestoreEntityVersion.java | 175 + .../FeaturestoreEntityVersionProperties.java | 133 + ...tityVersionResourceArmPaginatedResult.java | 83 + .../models/FeaturestoreEntityVersions.java | 171 + .../models/FixedInputData.java | 58 + .../models/ForecastingSettings.java | 10 +- .../models/FqdnOutboundRule.java | 70 + .../GetBlobReferenceForConsumptionDto.java | 105 + .../models/GetBlobReferenceSasRequestDto.java | 76 + .../GetBlobReferenceSasResponseDto.java | 25 + .../machinelearning/models/Image.java | 121 + .../machinelearning/models/ImageMetadata.java | 106 + .../ImageModelDistributionSettings.java | 10 +- ...delDistributionSettingsClassification.java | 10 +- ...elDistributionSettingsObjectDetection.java | 10 +- .../machinelearning/models/ImageType.java | 51 + .../machinelearning/models/IndexColumn.java | 76 + .../machinelearning/models/IsolationMode.java | 50 + .../machinelearning/models/JobBase.java | 7 + .../machinelearning/models/JobService.java | 32 + .../machinelearning/models/JobTier.java | 56 + .../machinelearning/models/Jobs.java | 3 + .../models/ManagedComputeIdentity.java | 59 + .../models/ManagedIdentity.java | 2 +- .../models/ManagedIdentityCredential.java | 168 + .../ManagedNetworkProvisionOptions.java | 50 + .../models/ManagedNetworkProvisionStatus.java | 31 + .../models/ManagedNetworkProvisions.java | 37 + .../models/ManagedNetworkSettings.java | 46 + .../models/ManagedNetworkSettingsRules.java | 144 + .../models/ManagedNetworkStatus.java | 47 + .../MaterializationComputeResource.java | 50 + .../models/MaterializationSettings.java | 166 + .../models/MaterializationStoreType.java | 53 + .../models/ModelContainer.java | 13 +- .../models/ModelContainerProperties.java | 16 + .../models/ModelContainers.java | 55 +- .../machinelearning/models/ModelTaskType.java | 47 + .../machinelearning/models/ModelVersion.java | 40 +- .../models/ModelVersionProperties.java | 41 + .../machinelearning/models/ModelVersions.java | 69 +- .../MonitorComputeConfigurationBase.java | 33 + .../models/MonitorComputeIdentityBase.java | 36 + .../models/MonitorComputeIdentityType.java | 47 + .../models/MonitorComputeType.java | 44 + .../models/MonitorDefinition.java | 164 + .../MonitorEmailNotificationSettings.java | 51 + .../models/MonitorNotificationSettings.java | 54 + .../models/MonitorServerlessSparkCompute.java | 133 + .../models/MonitoringFeatureDataType.java | 47 + .../models/MonitoringFeatureFilterBase.java | 37 + .../models/MonitoringFeatureFilterType.java | 50 + .../models/MonitoringInputDataBase.java | 159 + .../models/MonitoringInputDataType.java | 50 + .../models/MonitoringNotificationType.java | 44 + .../models/MonitoringSignalBase.java | 96 + .../models/MonitoringSignalType.java | 56 + .../models/MonitoringTarget.java | 110 + .../models/MonitoringThreshold.java | 50 + .../machinelearning/models/Nodes.java | 33 + .../models/NodesValueType.java | 44 + .../models/NotificationSetting.java | 118 + .../models/NumericalDataDriftMetric.java | 55 + .../NumericalDataDriftMetricThreshold.java | 72 + .../models/NumericalDataQualityMetric.java | 50 + .../NumericalDataQualityMetricThreshold.java | 72 + .../NumericalPredictionDriftMetric.java | 56 + ...mericalPredictionDriftMetricThreshold.java | 72 + .../models/OnlineDeployment.java | 13 + .../models/OnlineEndpoint.java | 17 +- .../models/OnlineEndpointProperties.java | 30 + .../models/OnlineEndpoints.java | 4 +- .../machinelearning/models/Operation.java | 56 + .../models/OperationDisplay.java | 91 + .../models/OperationListResult.java | 62 + .../machinelearning/models/Operations.java | 8 +- .../machinelearning/models/Origin.java | 53 + .../machinelearning/models/OutboundRule.java | 90 + .../models/OutboundRuleBasicResource.java | 176 + .../models/OutboundRuleListResult.java | 86 + .../models/PartialManagedServiceIdentity.java | 2 +- ...ialMinimalTrackedResourceWithIdentity.java | 2 +- ...PartialRegistryPartialTrackedResource.java | 111 + .../models/PendingUploadCredentialDto.java | 33 + .../models/PendingUploadCredentialType.java | 44 + .../models/PendingUploadRequestDto.java | 76 + .../models/PendingUploadResponseDto.java | 38 + .../models/PendingUploadType.java | 47 + .../PredictionDriftMetricThresholdBase.java | 68 + .../PredictionDriftMonitoringSignal.java | 181 + .../models/PrivateEndpoint.java | 17 +- .../models/PrivateEndpointConnection.java | 16 + .../models/PrivateEndpointDestination.java | 131 + .../models/PrivateEndpointOutboundRule.java | 76 + .../models/PrivateEndpointResource.java | 52 + .../machinelearning/models/Protocol.java | 54 + .../machinelearning/models/QueueSettings.java | 50 + .../machinelearning/models/Recurrence.java | 163 + .../machinelearning/models/Registries.java | 183 + .../machinelearning/models/Registry.java | 466 ++ .../models/RegistryCodeContainers.java | 143 + .../models/RegistryCodeVersions.java | 196 + .../models/RegistryComponentContainers.java | 143 + .../models/RegistryComponentVersions.java | 158 + .../models/RegistryDataContainers.java | 145 + .../models/RegistryDataReferences.java | 49 + .../models/RegistryDataVersions.java | 202 + .../models/RegistryEnvironmentContainers.java | 145 + .../models/RegistryEnvironmentVersions.java | 160 + .../models/RegistryModelContainers.java | 145 + .../models/RegistryModelVersions.java | 206 + ...RegistryPartialManagedServiceIdentity.java | 41 + .../RegistryPrivateEndpointConnection.java | 197 + ...stryPrivateLinkServiceConnectionState.java | 102 + .../models/RegistryRegionArmDetails.java | 109 + ...stryTrackedResourceArmPaginatedResult.java | 81 + .../models/RollingInputData.java | 153 + .../machinelearning/models/RuleAction.java | 47 + .../machinelearning/models/RuleCategory.java | 50 + .../machinelearning/models/RuleStatus.java | 47 + .../machinelearning/models/RuleType.java | 50 + .../machinelearning/models/SasCredential.java | 56 + .../models/SasCredentialDto.java | 56 + .../models/SasDatastoreCredentials.java | 2 +- .../machinelearning/models/Schedule.java | 7 + .../models/ScheduleActionBase.java | 1 + .../models/ScheduleActionType.java | 3 + .../models/ServerlessComputeSettings.java | 81 + .../ServicePrincipalDatastoreCredentials.java | 2 +- .../models/ServiceTagDestination.java | 144 + .../models/ServiceTagOutboundRule.java | 75 + .../models/StaticInputData.java | 151 + .../models/StorageAccountDetails.java | 85 + .../machinelearning/models/SweepJob.java | 29 + .../models/SystemCreatedAcrAccount.java | 105 + .../models/SystemCreatedStorageAccount.java | 167 + .../machinelearning/models/TmpfsOptions.java | 50 + .../models/TopNFeaturesByAttribution.java | 56 + .../models/UserAssignedIdentity.java | 2 +- .../models/UserCreatedAcrAccount.java | 53 + .../models/UserCreatedStorageAccount.java | 53 + .../machinelearning/models/UserIdentity.java | 2 +- .../models/VolumeDefinition.java | 247 + .../models/VolumeDefinitionType.java | 57 + .../machinelearning/models/VolumeOptions.java | 50 + .../machinelearning/models/Webhook.java | 60 + .../machinelearning/models/WebhookType.java | 44 + .../machinelearning/models/Workspace.java | 91 +- .../WorkspaceConnectionManagedIdentity.java | 2 +- ...ceConnectionPropertiesV2BasicResource.java | 5 + .../models/WorkspaceProperties.java | 14 + .../models/WorkspaceUpdateParameters.java | 24 + .../machinelearning/models/Workspaces.java | 8 +- .../machinelearning/models/package-info.java | 2 +- .../machinelearning/package-info.java | 2 +- ...BatchDeploymentsCreateOrUpdateSamples.java | 7 +- .../BatchDeploymentsDeleteSamples.java | 7 +- .../generated/BatchDeploymentsGetSamples.java | 7 +- .../BatchDeploymentsListSamples.java | 7 +- .../BatchDeploymentsUpdateSamples.java | 8 +- .../BatchEndpointsCreateOrUpdateSamples.java | 7 +- .../BatchEndpointsDeleteSamples.java | 7 +- .../generated/BatchEndpointsGetSamples.java | 7 +- .../BatchEndpointsListKeysSamples.java | 7 +- .../generated/BatchEndpointsListSamples.java | 7 +- .../BatchEndpointsUpdateSamples.java | 9 +- .../CodeContainersCreateOrUpdateSamples.java | 25 +- .../CodeContainersDeleteSamples.java | 7 +- .../generated/CodeContainersGetSamples.java | 7 +- .../generated/CodeContainersListSamples.java | 7 +- ...sCreateOrGetStartPendingUploadSamples.java | 34 + .../CodeVersionsCreateOrUpdateSamples.java | 32 +- .../generated/CodeVersionsDeleteSamples.java | 7 +- .../generated/CodeVersionsGetSamples.java | 7 +- .../generated/CodeVersionsListSamples.java | 18 +- .../generated/CodeVersionsPublishSamples.java | 34 + ...ponentContainersCreateOrUpdateSamples.java | 27 +- .../ComponentContainersDeleteSamples.java | 6 +- .../ComponentContainersGetSamples.java | 7 +- .../ComponentContainersListSamples.java | 6 +- ...omponentVersionsCreateOrUpdateSamples.java | 44 +- .../ComponentVersionsDeleteSamples.java | 6 +- .../ComponentVersionsGetSamples.java | 7 +- .../ComponentVersionsListSamples.java | 7 +- .../ComponentVersionsPublishSamples.java | 34 + .../ComputeCreateOrUpdateSamples.java | 88 +- .../generated/ComputeDeleteSamples.java | 2 +- .../generated/ComputeGetSamples.java | 8 +- .../generated/ComputeListKeysSamples.java | 2 +- .../generated/ComputeListNodesSamples.java | 2 +- .../generated/ComputeListSamples.java | 2 +- .../generated/ComputeRestartSamples.java | 2 +- .../generated/ComputeStartSamples.java | 2 +- .../generated/ComputeStopSamples.java | 2 +- .../generated/ComputeUpdateSamples.java | 2 +- .../DataContainersCreateOrUpdateSamples.java | 29 +- .../DataContainersDeleteSamples.java | 7 +- .../generated/DataContainersGetSamples.java | 7 +- .../generated/DataContainersListSamples.java | 7 +- .../DataVersionsCreateOrUpdateSamples.java | 32 +- .../generated/DataVersionsDeleteSamples.java | 7 +- .../generated/DataVersionsGetSamples.java | 7 +- .../generated/DataVersionsListSamples.java | 7 +- .../generated/DataVersionsPublishSamples.java | 34 + .../DatastoresCreateOrUpdateSamples.java | 9 +- .../generated/DatastoresDeleteSamples.java | 2 +- .../generated/DatastoresGetSamples.java | 2 +- .../generated/DatastoresListSamples.java | 2 +- .../DatastoresListSecretsSamples.java | 2 +- ...onmentContainersCreateOrUpdateSamples.java | 41 +- .../EnvironmentContainersDeleteSamples.java | 6 +- .../EnvironmentContainersGetSamples.java | 6 +- .../EnvironmentContainersListSamples.java | 6 +- ...ironmentVersionsCreateOrUpdateSamples.java | 54 +- .../EnvironmentVersionsDeleteSamples.java | 6 +- .../EnvironmentVersionsGetSamples.java | 7 +- .../EnvironmentVersionsListSamples.java | 6 +- .../EnvironmentVersionsPublishSamples.java | 34 + .../generated/FeaturesGetSamples.java | 23 + .../generated/FeaturesListSamples.java | 33 + ...uresetContainersCreateOrUpdateSamples.java | 47 + .../FeaturesetContainersDeleteSamples.java | 23 + .../FeaturesetContainersGetEntitySamples.java | 23 + .../FeaturesetContainersListSamples.java | 35 + .../FeaturesetVersionsBackfillSamples.java | 61 + ...aturesetVersionsCreateOrUpdateSamples.java | 84 + .../FeaturesetVersionsDeleteSamples.java | 23 + .../FeaturesetVersionsGetSamples.java | 23 + .../FeaturesetVersionsListSamples.java | 38 + ...EntityContainersCreateOrUpdateSamples.java | 47 + ...urestoreEntityContainersDeleteSamples.java | 23 + ...storeEntityContainersGetEntitySamples.java | 23 + ...aturestoreEntityContainersListSamples.java | 35 + ...reEntityVersionsCreateOrUpdateSamples.java | 54 + ...aturestoreEntityVersionsDeleteSamples.java | 23 + .../FeaturestoreEntityVersionsGetSamples.java | 23 + ...FeaturestoreEntityVersionsListSamples.java | 38 + .../generated/JobsCancelSamples.java | 2 +- .../generated/JobsCreateOrUpdateSamples.java | 9 +- .../generated/JobsDeleteSamples.java | 10 +- .../generated/JobsGetSamples.java | 8 +- .../generated/JobsListSamples.java | 21 +- ...visionsProvisionManagedNetworkSamples.java | 29 + ...workSettingsRuleCreateOrUpdateSamples.java | 34 + ...nagedNetworkSettingsRuleDeleteSamples.java | 23 + .../ManagedNetworkSettingsRuleGetSamples.java | 24 + ...ManagedNetworkSettingsRuleListSamples.java | 21 + .../ModelContainersCreateOrUpdateSamples.java | 25 +- .../ModelContainersDeleteSamples.java | 7 +- .../generated/ModelContainersGetSamples.java | 7 +- .../generated/ModelContainersListSamples.java | 7 +- .../ModelVersionsCreateOrUpdateSamples.java | 36 +- .../generated/ModelVersionsDeleteSamples.java | 7 +- .../generated/ModelVersionsGetSamples.java | 7 +- .../generated/ModelVersionsListSamples.java | 7 +- .../ModelVersionsPublishSamples.java | 34 + ...nlineDeploymentsCreateOrUpdateSamples.java | 5 +- .../OnlineDeploymentsDeleteSamples.java | 6 +- .../OnlineDeploymentsGetLogsSamples.java | 2 +- .../OnlineDeploymentsGetSamples.java | 4 +- .../OnlineDeploymentsListSamples.java | 2 +- .../OnlineDeploymentsListSkusSamples.java | 4 +- .../OnlineDeploymentsUpdateSamples.java | 5 +- .../OnlineEndpointsCreateOrUpdateSamples.java | 7 +- .../OnlineEndpointsDeleteSamples.java | 7 +- .../generated/OnlineEndpointsGetSamples.java | 7 +- .../OnlineEndpointsGetTokenSamples.java | 6 +- .../OnlineEndpointsListKeysSamples.java | 6 +- .../generated/OnlineEndpointsListSamples.java | 7 +- .../OnlineEndpointsRegenerateKeysSamples.java | 6 +- .../OnlineEndpointsUpdateSamples.java | 9 +- .../generated/OperationsListSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- .../PrivateLinkResourcesListSamples.java | 2 +- .../generated/QuotasListSamples.java | 2 +- .../generated/QuotasUpdateSamples.java | 2 +- .../RegistriesCreateOrUpdateSamples.java | 186 + .../generated/RegistriesDeleteSamples.java | 20 + .../RegistriesGetByResourceGroupSamples.java | 34 + .../RegistriesListByResourceGroupSamples.java | 34 + .../generated/RegistriesListSamples.java | 21 + .../RegistriesRemoveRegionsSamples.java | 129 + .../generated/RegistriesUpdateSamples.java | 93 + ...ryCodeContainersCreateOrUpdateSamples.java | 45 + .../RegistryCodeContainersDeleteSamples.java | 23 + .../RegistryCodeContainersGetSamples.java | 23 + .../RegistryCodeContainersListSamples.java | 21 + ...sCreateOrGetStartPendingUploadSamples.java | 34 + ...stryCodeVersionsCreateOrUpdateSamples.java | 48 + .../RegistryCodeVersionsDeleteSamples.java | 23 + .../RegistryCodeVersionsGetSamples.java | 23 + .../RegistryCodeVersionsListSamples.java | 23 + ...ponentContainersCreateOrUpdateSamples.java | 46 + ...istryComponentContainersDeleteSamples.java | 23 + ...RegistryComponentContainersGetSamples.java | 23 + ...egistryComponentContainersListSamples.java | 23 + ...omponentVersionsCreateOrUpdateSamples.java | 57 + ...egistryComponentVersionsDeleteSamples.java | 23 + .../RegistryComponentVersionsGetSamples.java | 23 + .../RegistryComponentVersionsListSamples.java | 23 + ...ryDataContainersCreateOrUpdateSamples.java | 49 + .../RegistryDataContainersDeleteSamples.java | 21 + .../RegistryDataContainersGetSamples.java | 23 + .../RegistryDataContainersListSamples.java | 25 + ...aReferencesGetBlobReferenceSasSamples.java | 33 + ...sCreateOrGetStartPendingUploadSamples.java | 34 + ...stryDataVersionsCreateOrUpdateSamples.java | 51 + .../RegistryDataVersionsDeleteSamples.java | 23 + .../RegistryDataVersionsGetSamples.java | 23 + .../RegistryDataVersionsListSamples.java | 34 + ...onmentContainersCreateOrUpdateSamples.java | 48 + ...tryEnvironmentContainersDeleteSamples.java | 23 + ...gistryEnvironmentContainersGetSamples.java | 23 + ...istryEnvironmentContainersListSamples.java | 23 + ...ironmentVersionsCreateOrUpdateSamples.java | 62 + ...istryEnvironmentVersionsDeleteSamples.java | 23 + ...RegistryEnvironmentVersionsGetSamples.java | 23 + ...egistryEnvironmentVersionsListSamples.java | 23 + ...yModelContainersCreateOrUpdateSamples.java | 45 + .../RegistryModelContainersDeleteSamples.java | 23 + .../RegistryModelContainersGetSamples.java | 23 + .../RegistryModelContainersListSamples.java | 23 + ...sCreateOrGetStartPendingUploadSamples.java | 34 + ...tryModelVersionsCreateOrUpdateSamples.java | 51 + .../RegistryModelVersionsDeleteSamples.java | 23 + .../RegistryModelVersionsGetSamples.java | 23 + .../RegistryModelVersionsListSamples.java | 35 + .../SchedulesCreateOrUpdateSamples.java | 3 +- .../generated/SchedulesDeleteSamples.java | 2 +- .../generated/SchedulesGetSamples.java | 2 +- .../generated/SchedulesListSamples.java | 2 +- .../generated/UsagesListSamples.java | 2 +- .../VirtualMachineSizesListSamples.java | 2 +- .../WorkspaceConnectionsCreateSamples.java | 2 +- .../WorkspaceConnectionsDeleteSamples.java | 2 +- .../WorkspaceConnectionsGetSamples.java | 2 +- .../WorkspaceConnectionsListSamples.java | 2 +- .../WorkspaceFeaturesListSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 3 +- .../generated/WorkspacesDeleteSamples.java | 4 +- .../generated/WorkspacesDiagnoseSamples.java | 3 +- .../WorkspacesGetByResourceGroupSamples.java | 2 +- .../WorkspacesListByResourceGroupSamples.java | 2 +- .../generated/WorkspacesListKeysSamples.java | 2 +- ...kspacesListNotebookAccessTokenSamples.java | 2 +- .../WorkspacesListNotebookKeysSamples.java | 2 +- ...ndNetworkDependenciesEndpointsSamples.java | 2 +- .../generated/WorkspacesListSamples.java | 2 +- ...rkspacesListStorageAccountKeysSamples.java | 2 +- .../WorkspacesPrepareNotebookSamples.java | 2 +- .../WorkspacesResyncKeysSamples.java | 2 +- .../generated/WorkspacesUpdateSamples.java | 2 +- .../AksNetworkingConfigurationTests.java | 39 - .../AmlComputeNodeInformationTests.java | 25 - .../AmlComputeNodesInformationTests.java | 25 - .../generated/AmlOperationDisplayTests.java | 39 - .../generated/AmlOperationInnerTests.java | 48 - .../AmlOperationListResultTests.java | 72 - .../generated/AmlTokenTests.java | 21 - .../generated/AmlUserFeatureInnerTests.java | 32 - .../generated/AssetBaseTests.java | 55 - .../generated/AssetContainerTests.java | 53 - .../generated/AssetJobInputTests.java | 28 - .../generated/AssetJobOutputTests.java | 28 - .../generated/AssetReferenceBaseTests.java | 22 - .../generated/AssignedUserTests.java | 29 - .../generated/AutoForecastHorizonTests.java | 21 - .../generated/AutoMLJobTests.java | 168 - .../generated/AutoMLVerticalTests.java | 44 - .../generated/AutoNCrossValidationsTests.java | 22 - .../generated/AutoPausePropertiesTests.java | 29 - .../generated/AutoScalePropertiesTests.java | 32 - .../generated/AutoSeasonalityTests.java | 21 - .../generated/AutoTargetLagsTests.java | 21 - .../AutoTargetRollingWindowSizeTests.java | 22 - .../generated/BanditPolicyTests.java | 39 - ...rackedResourceArmPaginatedResultTests.java | 221 - .../BatchDeploymentsDeleteMockTests.java | 63 - .../generated/BatchEndpointDefaultsTests.java | 25 - ...rackedResourceArmPaginatedResultTests.java | 96 - .../BatchEndpointsDeleteMockTests.java | 61 - .../generated/BatchRetrySettingsTests.java | 31 - .../BayesianSamplingAlgorithmTests.java | 22 - .../generated/BuildContextTests.java | 29 - .../generated/ClassificationTests.java | 228 - .../ClassificationTrainingSettingsTests.java | 69 - .../ClusterUpdateParametersTests.java | 23 - .../ClusterUpdatePropertiesTests.java | 47 - .../generated/CodeContainerInnerTests.java | 64 - .../CodeContainerPropertiesTests.java | 54 - ...tainerResourceArmPaginatedResultTests.java | 81 - ...rsCreateOrUpdateWithResponseMockTests.java | 103 - ...ContainersDeleteWithResponseMockTests.java | 63 - ...odeContainersGetWithResponseMockTests.java | 73 - .../CodeContainersListMockTests.java | 71 - ...deVersionsDeleteWithResponseMockTests.java | 63 - .../generated/ColumnTransformerTests.java | 29 - .../generated/CommandJobLimitsTests.java | 28 - .../ComponentContainerInnerTests.java | 55 - .../ComponentContainerPropertiesTests.java | 52 - ...tainerResourceArmPaginatedResultTests.java | 67 - ...rsCreateOrUpdateWithResponseMockTests.java | 94 - ...ContainersDeleteWithResponseMockTests.java | 64 - ...entContainersGetWithResponseMockTests.java | 73 - .../ComponentContainersListMockTests.java | 74 - .../generated/ComponentVersionInnerTests.java | 59 - .../ComponentVersionPropertiesTests.java | 57 - ...ersionResourceArmPaginatedResultTests.java | 64 - ...nsCreateOrUpdateWithResponseMockTests.java | 97 - ...ntVersionsDeleteWithResponseMockTests.java | 64 - ...onentVersionsGetWithResponseMockTests.java | 75 - .../ComponentVersionsListMockTests.java | 83 - .../ComputeInstanceApplicationTests.java | 30 - ...uteInstanceConnectivityEndpointsTests.java | 24 - .../ComputeInstanceContainerTests.java | 48 - .../ComputeInstanceCreatedByTests.java | 25 - .../ComputeInstanceDataDiskTests.java | 41 - .../ComputeInstanceDataMountTests.java | 58 - .../ComputeInstanceEnvironmentInfoTests.java | 30 - .../ComputeInstanceLastOperationTests.java | 43 - .../ComputeInstanceVersionTests.java | 25 - .../generated/ComputeResourceInnerTests.java | 89 - .../generated/ComputeResourceSchemaTests.java | 42 - .../generated/ComputeSchedulesTests.java | 164 - .../generated/ComputeSecretsInnerTests.java | 22 - .../ComputeStartStopScheduleTests.java | 103 - .../generated/ComputeTests.java | 39 - .../ComputesCreateOrUpdateMockTests.java | 119 - .../generated/ComputesDeleteMockTests.java | 65 - .../ComputesGetWithResponseMockTests.java | 83 - ...ComputesListKeysWithResponseMockTests.java | 66 - .../generated/ComputesListMockTests.java | 81 - .../generated/ComputesListNodesMockTests.java | 65 - .../ContainerResourceRequirementsTests.java | 44 - .../ContainerResourceSettingsTests.java | 32 - .../generated/CosmosDbSettingsTests.java | 25 - .../generated/CronTriggerTests.java | 39 - .../generated/CustomForecastHorizonTests.java | 25 - .../generated/CustomModelJobInputTests.java | 34 - .../generated/CustomModelJobOutputTests.java | 37 - .../CustomNCrossValidationsTests.java | 25 - .../generated/CustomSeasonalityTests.java | 25 - .../generated/CustomTargetLagsTests.java | 28 - .../CustomTargetRollingWindowSizeTests.java | 27 - .../generated/DataContainerInnerTests.java | 59 - .../DataContainerPropertiesTests.java | 74 - ...tainerResourceArmPaginatedResultTests.java | 72 - ...rsCreateOrUpdateWithResponseMockTests.java | 98 - ...ContainersDeleteWithResponseMockTests.java | 61 - ...ataContainersGetWithResponseMockTests.java | 75 - .../DataContainersListMockTests.java | 81 - .../generated/DataFactoryTests.java | 39 - ...ataLakeAnalyticsSchemaPropertiesTests.java | 28 - .../DataLakeAnalyticsSchemaTests.java | 30 - .../generated/DataLakeAnalyticsTests.java | 43 - .../DataPathAssetReferenceTests.java | 31 - .../generated/DataVersionBaseInnerTests.java | 61 - .../DataVersionBasePropertiesTests.java | 58 - ...onBaseResourceArmPaginatedResultTests.java | 84 - ...nsCreateOrUpdateWithResponseMockTests.java | 107 - ...taVersionsDeleteWithResponseMockTests.java | 64 - .../DataVersionsGetWithResponseMockTests.java | 75 - .../generated/DataVersionsListMockTests.java | 85 - ...astoreResourceArmPaginatedResultTests.java | 57 - ...DatastoresDeleteWithResponseMockTests.java | 63 - .../generated/DefaultScaleSettingsTests.java | 22 - .../generated/DeploymentLogsInnerTests.java | 25 - .../generated/DeploymentLogsRequestTests.java | 31 - .../DeploymentResourceConfigurationTests.java | 47 - .../DistributionConfigurationTests.java | 24 - .../EarlyTerminationPolicyTests.java | 31 - .../EndpointScheduleActionTests.java | 24 - .../EnvironmentContainerInnerTests.java | 56 - .../EnvironmentContainerPropertiesTests.java | 52 - ...tainerResourceArmPaginatedResultTests.java | 60 - ...rsCreateOrUpdateWithResponseMockTests.java | 103 - ...ContainersDeleteWithResponseMockTests.java | 63 - ...entContainersGetWithResponseMockTests.java | 73 - .../EnvironmentContainersListMockTests.java | 79 - .../EnvironmentVersionInnerTests.java | 80 - .../EnvironmentVersionPropertiesTests.java | 95 - ...ersionResourceArmPaginatedResultTests.java | 77 - ...nsCreateOrUpdateWithResponseMockTests.java | 121 - ...ntVersionsDeleteWithResponseMockTests.java | 63 - ...nmentVersionsGetWithResponseMockTests.java | 82 - .../EnvironmentVersionsListMockTests.java | 93 - .../generated/EstimatedVMPriceTests.java | 37 - .../generated/EstimatedVMPricesTests.java | 52 - .../ExternalFqdnResponseInnerTests.java | 45 - .../generated/FeaturizationSettingsTests.java | 25 - .../generated/FlavorDataTests.java | 43 - .../generated/ForecastHorizonTests.java | 21 - .../generated/ForecastingSettingsTests.java | 67 - .../generated/ForecastingTests.java | 268 - .../ForecastingTrainingSettingsTests.java | 75 - .../generated/FqdnEndpointDetailTests.java | 24 - .../generated/FqdnEndpointTests.java | 41 - .../FqdnEndpointsPropertiesTests.java | 40 - .../generated/FqdnEndpointsTests.java | 44 - .../generated/GridSamplingAlgorithmTests.java | 22 - .../generated/IdAssetReferenceTests.java | 27 - .../generated/IdentityConfigurationTests.java | 22 - .../generated/IdentityForCmkTests.java | 25 - .../ImageClassificationBaseTests.java | 362 -- .../ImageClassificationMultilabelTests.java | 414 -- .../generated/ImageClassificationTests.java | 384 -- .../ImageInstanceSegmentationTests.java | 374 -- .../generated/ImageLimitSettingsTests.java | 36 - ...stributionSettingsClassificationTests.java | 123 - ...tributionSettingsObjectDetectionTests.java | 150 - .../ImageModelDistributionSettingsTests.java | 111 - ...ImageModelSettingsClassificationTests.java | 147 - ...mageModelSettingsObjectDetectionTests.java | 176 - .../generated/ImageModelSettingsTests.java | 135 - .../ImageObjectDetectionBaseTests.java | 394 -- .../generated/ImageObjectDetectionTests.java | 374 -- .../generated/ImageSweepSettingsTests.java | 38 - .../generated/ImageVerticalTests.java | 72 - .../InferenceContainerPropertiesTests.java | 43 - .../InstanceTypeSchemaResourcesTests.java | 47 - .../generated/InstanceTypeSchemaTests.java | 52 - .../generated/JobBaseInnerTests.java | 84 - .../generated/JobBasePropertiesTests.java | 123 - ...obBaseResourceArmPaginatedResultTests.java | 97 - .../generated/JobInputTests.java | 25 - .../generated/JobLimitsTests.java | 28 - .../generated/JobOutputTests.java | 27 - .../JobResourceConfigurationTests.java | 53 - .../generated/JobScheduleActionTests.java | 96 - .../generated/JobServiceTests.java | 61 - .../generated/JobsCancelMockTests.java | 61 - ...bsCreateOrUpdateWithResponseMockTests.java | 105 - .../generated/JobsDeleteMockTests.java | 61 - .../JobsGetWithResponseMockTests.java | 77 - .../generated/JobsListMockTests.java | 85 - .../generated/KubernetesPropertiesTests.java | 88 - .../generated/KubernetesSchemaTests.java | 66 - .../generated/KubernetesTests.java | 78 - .../ListAmlUserFeatureResultTests.java | 25 - .../generated/ListUsagesResultTests.java | 25 - .../generated/ListWorkspaceQuotasTests.java | 25 - .../generated/LiteralJobInputTests.java | 29 - .../generated/MLFlowModelJobInputTests.java | 37 - .../generated/MLFlowModelJobOutputTests.java | 37 - .../generated/MLTableDataTests.java | 71 - .../generated/MLTableJobInputTests.java | 34 - .../generated/MLTableJobOutputTests.java | 37 - .../generated/ManagedIdentityTests.java | 37 - .../ManagedServiceIdentityTests.java | 46 - .../generated/MedianStoppingPolicyTests.java | 31 - .../generated/ModelContainerInnerTests.java | 71 - .../ModelContainerPropertiesTests.java | 61 - ...tainerResourceArmPaginatedResultTests.java | 60 - ...rsCreateOrUpdateWithResponseMockTests.java | 94 - ...ContainersDeleteWithResponseMockTests.java | 63 - ...delContainersGetWithResponseMockTests.java | 73 - .../ModelContainersListMockTests.java | 74 - .../generated/ModelVersionInnerTests.java | 79 - .../ModelVersionPropertiesTests.java | 87 - ...ersionResourceArmPaginatedResultTests.java | 97 - ...nsCreateOrUpdateWithResponseMockTests.java | 114 - ...elVersionsDeleteWithResponseMockTests.java | 64 - ...ModelVersionsGetWithResponseMockTests.java | 78 - .../generated/ModelVersionsListMockTests.java | 92 - .../machinelearning/generated/MpiTests.java | 27 - .../generated/NCrossValidationsTests.java | 22 - ...NlpVerticalFeaturizationSettingsTests.java | 25 - .../NlpVerticalLimitSettingsTests.java | 36 - .../generated/NlpVerticalTests.java | 57 - .../generated/NodeStateCountsTests.java | 25 - ...ypeWorkspaceConnectionPropertiesTests.java | 41 - .../generated/ObjectiveTests.java | 30 - ...rackedResourceArmPaginatedResultTests.java | 201 - .../OnlineDeploymentsDeleteMockTests.java | 63 - ...ploymentsGetLogsWithResponseMockTests.java | 77 - .../OnlineDeploymentsListSkusMockTests.java | 77 - ...rackedResourceArmPaginatedResultTests.java | 161 - .../OnlineEndpointsDeleteMockTests.java | 61 - .../generated/OnlineRequestSettingsTests.java | 37 - .../generated/OnlineScaleSettingsTests.java | 22 - .../generated/OperationsListMockTests.java | 72 - .../OutputPathAssetReferenceTests.java | 29 - .../PaginatedComputeResourcesListTests.java | 97 - ...malTrackedResourceWithPropertiesTests.java | 50 - .../PartialBatchDeploymentTests.java | 25 - .../PartialManagedServiceIdentityTests.java | 44 - .../PartialMinimalTrackedResourceTests.java | 42 - ...nimalTrackedResourceWithIdentityTests.java | 52 - ...ialMinimalTrackedResourceWithSkuTests.java | 62 - .../generated/PartialSkuTests.java | 43 - .../generated/PasswordTests.java | 22 - .../PersonalComputeInstanceSettingsTests.java | 32 - .../generated/PipelineJobTests.java | 123 - .../PrivateEndpointConnectionInnerTests.java | 102 - ...vateEndpointConnectionListResultTests.java | 125 - ...vateEndpointConnectionPropertiesTests.java | 46 - ...nsCreateOrUpdateWithResponseMockTests.java | 122 - ...onnectionsDeleteWithResponseMockTests.java | 63 - ...ntConnectionsGetWithResponseMockTests.java | 85 - ...ivateEndpointConnectionsListMockTests.java | 87 - .../generated/PrivateEndpointTests.java | 22 - ...ivateLinkResourceListResultInnerTests.java | 120 - .../PrivateLinkResourcePropertiesTests.java | 30 - .../generated/PrivateLinkResourceTests.java | 85 - ...inkResourcesListWithResponseMockTests.java | 71 - ...rivateLinkServiceConnectionStateTests.java | 37 - .../generated/ProbeSettingsTests.java | 43 - .../generated/PyTorchTests.java | 27 - .../generated/QuotaBasePropertiesTests.java | 40 - .../generated/QuotaUpdateParametersTests.java | 49 - .../generated/QuotasListMockTests.java | 64 - .../QuotasUpdateWithResponseMockTests.java | 93 - .../RandomSamplingAlgorithmTests.java | 31 - .../generated/RecurrenceScheduleTests.java | 41 - .../generated/RecurrenceTriggerTests.java | 60 - .../generated/RegressionTests.java | 212 - .../RegressionTrainingSettingsTests.java | 69 - .../generated/ResourceBaseTests.java | 49 - .../generated/ResourceConfigurationTests.java | 47 - .../generated/ResourceIdTests.java | 24 - .../generated/ResourceNameTests.java | 24 - .../generated/ResourceQuotaInnerTests.java | 25 - .../machinelearning/generated/RouteTests.java | 26 - .../generated/SamplingAlgorithmTests.java | 24 - .../ScaleSettingsInformationTests.java | 40 - .../generated/ScaleSettingsTests.java | 37 - .../generated/ScheduleActionBaseTests.java | 22 - .../generated/ScheduleBaseTests.java | 37 - .../generated/ScheduleInnerTests.java | 81 - .../generated/SchedulePropertiesTests.java | 66 - ...heduleResourceArmPaginatedResultTests.java | 87 - .../SchedulesCreateOrUpdateMockTests.java | 103 - .../generated/SchedulesDeleteMockTests.java | 61 - .../SchedulesGetWithResponseMockTests.java | 74 - .../generated/SchedulesListMockTests.java | 78 - .../generated/ScriptReferenceTests.java | 39 - .../generated/ScriptsToExecuteTests.java | 56 - .../generated/SeasonalityTests.java | 21 - .../ServiceManagedResourcesSettingsTests.java | 30 - .../generated/SetupScriptsTests.java | 59 - ...haredPrivateLinkResourcePropertyTests.java | 40 - .../SharedPrivateLinkResourceTests.java | 43 - .../generated/SkuCapacityTests.java | 40 - .../SkuResourceArmPaginatedResultTests.java | 59 - .../generated/SkuResourceInnerTests.java | 50 - .../generated/SkuSettingTests.java | 28 - .../machinelearning/generated/SkuTests.java | 43 - .../generated/StackEnsembleSettingsTests.java | 35 - .../generated/SweepJobLimitsTests.java | 40 - .../SynapseSparkPropertiesTests.java | 69 - .../generated/SynapseSparkTests.java | 85 - .../generated/SystemServiceTests.java | 25 - ...bleVerticalFeaturizationSettingsTests.java | 69 - .../TableVerticalLimitSettingsTests.java | 49 - .../generated/TableVerticalTests.java | 132 - .../generated/TargetLagsTests.java | 21 - .../TargetRollingWindowSizeTests.java | 22 - .../TargetUtilizationScaleSettingsTests.java | 40 - .../generated/TensorFlowTests.java | 30 - .../TextClassificationMultilabelTests.java | 75 - .../generated/TextClassificationTests.java | 79 - .../generated/TextNerTests.java | 76 - .../generated/TrainingSettingsTests.java | 61 - .../generated/TriggerBaseTests.java | 33 - .../generated/TritonModelJobInputTests.java | 37 - .../generated/TritonModelJobOutputTests.java | 37 - .../TruncationSelectionPolicyTests.java | 36 - ...UpdateWorkspaceQuotasResultInnerTests.java | 25 - .../generated/UpdateWorkspaceQuotasTests.java | 32 - .../generated/UriFileDataVersionTests.java | 58 - .../generated/UriFileJobInputTests.java | 34 - .../generated/UriFileJobOutputTests.java | 34 - .../generated/UriFolderDataVersionTests.java | 67 - .../generated/UriFolderJobInputTests.java | 37 - .../generated/UriFolderJobOutputTests.java | 37 - .../generated/UsageInnerTests.java | 25 - .../generated/UsageNameTests.java | 22 - .../generated/UsagesListMockTests.java | 64 - .../generated/UserAssignedIdentityTests.java | 25 - .../generated/UserIdentityTests.java | 21 - .../generated/VirtualMachineImageTests.java | 25 - ...irtualMachineSizeListResultInnerTests.java | 62 - .../generated/VirtualMachineSizeTests.java | 70 - ...MachineSizesListWithResponseMockTests.java | 67 - ...rkspaceConnectionManagedIdentityTests.java | 30 - ...aceConnectionPersonalAccessTokenTests.java | 26 - ...2BasicResourceArmPaginatedResultTests.java | 51 - ...onPropertiesV2BasicResourceInnerTests.java | 44 - .../WorkspaceConnectionPropertiesV2Tests.java | 41 - ...eConnectionSharedAccessSignatureTests.java | 28 - ...onnectionsCreateWithResponseMockTests.java | 83 - ...onnectionsDeleteWithResponseMockTests.java | 63 - ...ceConnectionsGetWithResponseMockTests.java | 75 - .../WorkspaceConnectionsListMockTests.java | 75 - .../WorkspaceFeaturesListMockTests.java | 70 - ...kspacePropertiesUpdateParametersTests.java | 56 - .../WorkspaceUpdateParametersTests.java | 104 - .../generated/WorkspacesDeleteMockTests.java | 61 - ...denciesEndpointsWithResponseMockTests.java | 67 - .../WorkspacesResyncKeysMockTests.java | 61 - 974 files changed, 64838 insertions(+), 26444 deletions(-) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/{AzureMachineLearningWorkspaces.java => AzureMachineLearningServices.java} (58%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AzureMachineLearningWorkspacesBuilder.java => AzureMachineLearningServicesBuilder.java} (71%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AzureMachineLearningWorkspacesImpl.java => AzureMachineLearningServicesImpl.java} (66%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index 22cf70d8f2233..c315ebdea507b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-10-03) + +- Azure Resource Manager Machine Learning client library for Java. This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md index 1521aeacd892d..7813a331db8ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Machine Learning client library for Java. -This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2022-10. 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 Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-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-machinelearning - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,49 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +workspace = machineLearningManager.workspaces() + .define(workspaceName) + .withExistingResourceGroup(resourceGroupName) + .withRegion(REGION) + .withSku(new Sku().withName("Basic").withTier(SkuTier.BASIC)) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withFriendlyName(workspaceName) + .withStorageAccount( + storageManager.storageAccounts() + .define(storageName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withSku(StorageAccountSkuType.STANDARD_LRS) + .withMinimumTlsVersion(MinimumTlsVersion.TLS1_0) + .withHnsEnabled(false) + .withAccessFromAzureServices() + .withOnlyHttpsTraffic() + .withBlobStorageAccountKind().withAccessTier(AccessTier.HOT) + .create() + .id()) + .withKeyVault( + keyVaultManager.vaults() + .define(keyVaultName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withEmptyAccessPolicy() + .withSku(SkuName.STANDARD) + .withDeploymentDisabled() + .withAccessFromAllNetworks() + .create() + .id()) + .withApplicationInsights( + applicationInsightsManager.components() + .define(insightName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withKind("web") + .withApplicationType(ApplicationType.WEB) + .create() + .id()) + .create(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md) @@ -103,3 +146,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fmachinelearning%2Fazure-resourcemanager-machinelearning%2FREADME.png) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md index aace5155fc337..b99024e0a0103 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -27,10 +27,12 @@ ## CodeVersions +- [CreateOrGetStartPendingUpload](#codeversions_createorgetstartpendingupload) - [CreateOrUpdate](#codeversions_createorupdate) - [Delete](#codeversions_delete) - [Get](#codeversions_get) - [List](#codeversions_list) +- [Publish](#codeversions_publish) ## ComponentContainers @@ -45,6 +47,7 @@ - [Delete](#componentversions_delete) - [Get](#componentversions_get) - [List](#componentversions_list) +- [Publish](#componentversions_publish) ## Compute @@ -72,6 +75,7 @@ - [Delete](#dataversions_delete) - [Get](#dataversions_get) - [List](#dataversions_list) +- [Publish](#dataversions_publish) ## Datastores @@ -94,6 +98,41 @@ - [Delete](#environmentversions_delete) - [Get](#environmentversions_get) - [List](#environmentversions_list) +- [Publish](#environmentversions_publish) + +## Features + +- [Get](#features_get) +- [List](#features_list) + +## FeaturesetContainers + +- [CreateOrUpdate](#featuresetcontainers_createorupdate) +- [Delete](#featuresetcontainers_delete) +- [GetEntity](#featuresetcontainers_getentity) +- [List](#featuresetcontainers_list) + +## FeaturesetVersions + +- [Backfill](#featuresetversions_backfill) +- [CreateOrUpdate](#featuresetversions_createorupdate) +- [Delete](#featuresetversions_delete) +- [Get](#featuresetversions_get) +- [List](#featuresetversions_list) + +## FeaturestoreEntityContainers + +- [CreateOrUpdate](#featurestoreentitycontainers_createorupdate) +- [Delete](#featurestoreentitycontainers_delete) +- [GetEntity](#featurestoreentitycontainers_getentity) +- [List](#featurestoreentitycontainers_list) + +## FeaturestoreEntityVersions + +- [CreateOrUpdate](#featurestoreentityversions_createorupdate) +- [Delete](#featurestoreentityversions_delete) +- [Get](#featurestoreentityversions_get) +- [List](#featurestoreentityversions_list) ## Jobs @@ -103,6 +142,17 @@ - [Get](#jobs_get) - [List](#jobs_list) +## ManagedNetworkProvisions + +- [ProvisionManagedNetwork](#managednetworkprovisions_provisionmanagednetwork) + +## ManagedNetworkSettingsRule + +- [CreateOrUpdate](#managednetworksettingsrule_createorupdate) +- [Delete](#managednetworksettingsrule_delete) +- [Get](#managednetworksettingsrule_get) +- [List](#managednetworksettingsrule_list) + ## ModelContainers - [CreateOrUpdate](#modelcontainers_createorupdate) @@ -116,6 +166,7 @@ - [Delete](#modelversions_delete) - [Get](#modelversions_get) - [List](#modelversions_list) +- [Publish](#modelversions_publish) ## OnlineDeployments @@ -158,6 +209,93 @@ - [List](#quotas_list) - [Update](#quotas_update) +## Registries + +- [CreateOrUpdate](#registries_createorupdate) +- [Delete](#registries_delete) +- [GetByResourceGroup](#registries_getbyresourcegroup) +- [List](#registries_list) +- [ListByResourceGroup](#registries_listbyresourcegroup) +- [RemoveRegions](#registries_removeregions) +- [Update](#registries_update) + +## RegistryCodeContainers + +- [CreateOrUpdate](#registrycodecontainers_createorupdate) +- [Delete](#registrycodecontainers_delete) +- [Get](#registrycodecontainers_get) +- [List](#registrycodecontainers_list) + +## RegistryCodeVersions + +- [CreateOrGetStartPendingUpload](#registrycodeversions_createorgetstartpendingupload) +- [CreateOrUpdate](#registrycodeversions_createorupdate) +- [Delete](#registrycodeversions_delete) +- [Get](#registrycodeversions_get) +- [List](#registrycodeversions_list) + +## RegistryComponentContainers + +- [CreateOrUpdate](#registrycomponentcontainers_createorupdate) +- [Delete](#registrycomponentcontainers_delete) +- [Get](#registrycomponentcontainers_get) +- [List](#registrycomponentcontainers_list) + +## RegistryComponentVersions + +- [CreateOrUpdate](#registrycomponentversions_createorupdate) +- [Delete](#registrycomponentversions_delete) +- [Get](#registrycomponentversions_get) +- [List](#registrycomponentversions_list) + +## RegistryDataContainers + +- [CreateOrUpdate](#registrydatacontainers_createorupdate) +- [Delete](#registrydatacontainers_delete) +- [Get](#registrydatacontainers_get) +- [List](#registrydatacontainers_list) + +## RegistryDataReferences + +- [GetBlobReferenceSas](#registrydatareferences_getblobreferencesas) + +## RegistryDataVersions + +- [CreateOrGetStartPendingUpload](#registrydataversions_createorgetstartpendingupload) +- [CreateOrUpdate](#registrydataversions_createorupdate) +- [Delete](#registrydataversions_delete) +- [Get](#registrydataversions_get) +- [List](#registrydataversions_list) + +## RegistryEnvironmentContainers + +- [CreateOrUpdate](#registryenvironmentcontainers_createorupdate) +- [Delete](#registryenvironmentcontainers_delete) +- [Get](#registryenvironmentcontainers_get) +- [List](#registryenvironmentcontainers_list) + +## RegistryEnvironmentVersions + +- [CreateOrUpdate](#registryenvironmentversions_createorupdate) +- [Delete](#registryenvironmentversions_delete) +- [Get](#registryenvironmentversions_get) +- [List](#registryenvironmentversions_list) + +## RegistryModelContainers + +- [CreateOrUpdate](#registrymodelcontainers_createorupdate) +- [Delete](#registrymodelcontainers_delete) +- [Get](#registrymodelcontainers_get) +- [List](#registrymodelcontainers_list) + +## RegistryModelVersions + +- [CreateOrGetStartPendingUpload](#registrymodelversions_createorgetstartpendingupload) +- [CreateOrUpdate](#registrymodelversions_createorupdate) +- [Delete](#registrymodelversions_delete) +- [Get](#registrymodelversions_get) +- [List](#registrymodelversions_list) + ## Schedules - [CreateOrUpdate](#schedules_createorupdate) @@ -225,14 +363,14 @@ import java.util.Map; /** Samples for BatchDeployments CreateOrUpdate. */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Deployment. + * Sample code: CreateOrUpdate Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchDeployment( + public static void createOrUpdateWorkspaceBatchDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .batchDeployments() @@ -285,6 +423,7 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -304,14 +443,15 @@ public final class BatchDeploymentsCreateOrUpdateSamples { /** Samples for BatchDeployments Delete. */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/delete.json */ /** - * Sample code: Delete Batch Deployment. + * Sample code: Delete Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .delete( @@ -330,14 +470,15 @@ public final class BatchDeploymentsDeleteSamples { /** Samples for BatchDeployments Get. */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/get.json */ /** - * Sample code: Get Batch Deployment. + * Sample code: Get Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .getWithResponse( @@ -356,14 +497,15 @@ public final class BatchDeploymentsGetSamples { /** Samples for BatchDeployments List. */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/list.json */ /** - * Sample code: List Batch Deployment. + * Sample code: List Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .list( @@ -383,14 +525,15 @@ import java.util.Map; /** Samples for BatchDeployments Update. */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/update.json */ /** - * Sample code: Update Batch Deployment. + * Sample code: Update Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void updateWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { BatchDeployment resource = manager .batchDeployments() @@ -408,6 +551,7 @@ public final class BatchDeploymentsUpdateSamples { .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -438,14 +582,14 @@ import java.util.Map; /** Samples for BatchEndpoints CreateOrUpdate. */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Endpoint. + * Sample code: CreateOrUpdate Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchEndpoint( + public static void createOrUpdateWorkspaceBatchEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() @@ -474,6 +618,7 @@ public final class BatchEndpointsCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -493,14 +638,15 @@ public final class BatchEndpointsCreateOrUpdateSamples { /** Samples for BatchEndpoints Delete. */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/delete.json */ /** - * Sample code: Delete Batch Endpoint. + * Sample code: Delete Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); @@ -514,14 +660,15 @@ public final class BatchEndpointsDeleteSamples { /** Samples for BatchEndpoints Get. */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/get.json */ /** - * Sample code: Get Batch Endpoint. + * Sample code: Get Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); @@ -535,14 +682,15 @@ public final class BatchEndpointsGetSamples { /** Samples for BatchEndpoints List. */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/list.json */ /** - * Sample code: List Batch Endpoint. + * Sample code: List Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, com.azure.core.util.Context.NONE); } } @@ -554,14 +702,15 @@ public final class BatchEndpointsListSamples { /** Samples for BatchEndpoints ListKeys. */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/listKeys.json */ /** - * Sample code: ListKeys Batch Endpoint. + * Sample code: ListKeys Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listKeysWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); @@ -584,15 +733,15 @@ import java.util.Map; /** Samples for BatchEndpoints Update. */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/update.json */ /** - * Sample code: Update Batch Endpoint. + * Sample code: Update Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { + public static void updateWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { BatchEndpoint resource = manager .batchEndpoints() @@ -613,6 +762,7 @@ public final class BatchEndpointsUpdateSamples { .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -629,6 +779,7 @@ public final class BatchEndpointsUpdateSamples { ### CodeContainers_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import java.util.HashMap; import java.util.Map; @@ -636,26 +787,30 @@ import java.util.Map; /** Samples for CodeContainers CreateOrUpdate. */ public final class CodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Container. + * Sample code: CreateOrUpdate Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeContainer( + public static void createOrUpdateWorkspaceCodeContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new CodeContainerProperties() - .withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testContainer", + new CodeContainerInner() + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -675,14 +830,15 @@ public final class CodeContainersCreateOrUpdateSamples { /** Samples for CodeContainers Delete. */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/delete.json */ /** - * Sample code: Delete Code Container. + * Sample code: Delete Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); @@ -696,14 +852,15 @@ public final class CodeContainersDeleteSamples { /** Samples for CodeContainers Get. */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/get.json */ /** - * Sample code: Get Code Container. + * Sample code: Get Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() .getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); @@ -717,22 +874,57 @@ public final class CodeContainersGetSamples { /** Samples for CodeContainers List. */ public final class CodeContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/list.json */ /** - * Sample code: List Code Container. + * Sample code: List Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().list("testrg123", "testworkspace", null, com.azure.core.util.Context.NONE); } } ``` +### CodeVersions_CreateOrGetStartPendingUpload + +```java +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for CodeVersions CreateOrGetStartPendingUpload. */ +public final class CodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .codeVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.NONE), + com.azure.core.util.Context.NONE); + } +} +``` + ### CodeVersions_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import java.util.HashMap; import java.util.Map; @@ -740,29 +932,34 @@ import java.util.Map; /** Samples for CodeVersions CreateOrUpdate. */ public final class CodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Version. + * Sample code: CreateOrUpdate Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeVersion( + public static void createOrUpdateWorkspaceCodeVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties( - new CodeVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("fakeTokenPlaceholder")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new CodeVersionInner() + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -782,14 +979,15 @@ public final class CodeVersionsCreateOrUpdateSamples { /** Samples for CodeVersions Delete. */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/delete.json */ /** - * Sample code: Delete Code Version. + * Sample code: Delete Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -803,14 +1001,15 @@ public final class CodeVersionsDeleteSamples { /** Samples for CodeVersions Get. */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/get.json */ /** - * Sample code: Get Code Version. + * Sample code: Get Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -824,17 +1023,60 @@ public final class CodeVersionsGetSamples { /** Samples for CodeVersions List. */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/list.json + */ + /** + * Sample code: List Workspace Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .codeVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + "string", + 1, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### CodeVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for CodeVersions Publish. */ +public final class CodeVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/publish.json */ /** - * Sample code: List Code Version. + * Sample code: Publish Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void publishWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); } } ``` @@ -842,6 +1084,7 @@ public final class CodeVersionsListSamples { ### ComponentContainers_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import java.util.HashMap; import java.util.Map; @@ -849,27 +1092,31 @@ import java.util.Map; /** Samples for ComponentContainers CreateOrUpdate. */ public final class ComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Container. + * Sample code: CreateOrUpdate Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentContainer( + public static void createOrUpdateWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ComponentContainerProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string"))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + new ComponentContainerInner() + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -889,14 +1136,14 @@ public final class ComponentContainersCreateOrUpdateSamples { /** Samples for ComponentContainers Delete. */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/delete.json */ /** - * Sample code: Delete Component Container. + * Sample code: Delete Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentContainer( + public static void deleteWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() @@ -911,14 +1158,15 @@ public final class ComponentContainersDeleteSamples { /** Samples for ComponentContainers Get. */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/get.json */ /** - * Sample code: Get Component Container. + * Sample code: Get Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); @@ -932,14 +1180,14 @@ public final class ComponentContainersGetSamples { /** Samples for ComponentContainers List. */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/list.json */ /** - * Sample code: List Component Container. + * Sample code: List Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentContainer( + public static void listWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, com.azure.core.util.Context.NONE); } @@ -951,6 +1199,7 @@ public final class ComponentContainersListSamples { ```java import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; @@ -959,35 +1208,40 @@ import java.util.Map; /** Samples for ComponentVersions CreateOrUpdate. */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Version. + * Sample code: CreateOrUpdate Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentVersion( + public static void createOrUpdateWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties( - new ComponentVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", - Object.class, - SerializerEncoding.JSON))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ComponentVersionInner() + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1007,14 +1261,14 @@ public final class ComponentVersionsCreateOrUpdateSamples { /** Samples for ComponentVersions Delete. */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/delete.json */ /** - * Sample code: Delete Component Version. + * Sample code: Delete Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentVersion( + public static void deleteWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() @@ -1029,14 +1283,15 @@ public final class ComponentVersionsDeleteSamples { /** Samples for ComponentVersions Get. */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/get.json */ /** - * Sample code: Get Component Version. + * Sample code: Get Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -1050,14 +1305,15 @@ public final class ComponentVersionsGetSamples { /** Samples for ComponentVersions List. */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/list.json */ /** - * Sample code: List Component Version. + * Sample code: List Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); @@ -1065,6 +1321,39 @@ public final class ComponentVersionsListSamples { } ``` +### ComponentVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for ComponentVersions Publish. */ +public final class ComponentVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/publish.json + */ + /** + * Sample code: Publish Workspace Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .componentVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Compute_CreateOrUpdate ```java @@ -1078,27 +1367,44 @@ import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings; +import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; +import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; +import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; +import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; +import com.azure.resourcemanager.machinelearning.models.Cron; +import com.azure.resourcemanager.machinelearning.models.CustomService; import com.azure.resourcemanager.machinelearning.models.DataFactory; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; +import com.azure.resourcemanager.machinelearning.models.Protocol; import com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess; import com.azure.resourcemanager.machinelearning.models.ResourceId; import com.azure.resourcemanager.machinelearning.models.ScaleSettings; +import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; import com.azure.resourcemanager.machinelearning.models.VmPriority; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Compute CreateOrUpdate. */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -1116,7 +1422,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -1139,7 +1445,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -1176,7 +1482,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -1204,12 +1510,26 @@ public final class ComputeCreateOrUpdateSamples { .withAssignedUser( new AssignedUser() .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) + .withTenantId("00000000-0000-0000-0000-000000000000"))) + .withSchedules( + new ComputeSchedules() + .withComputeStartStop( + Arrays + .asList( + new ComputeStartStopSchedule() + .withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.CRON) + .withCron( + new Cron() + .withStartTime("2021-04-23T01:30:00") + .withTimeZone("Pacific Standard Time") + .withExpression("0 18 * * *"))))))) .create(); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -1245,7 +1565,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -1268,6 +1588,42 @@ public final class ComputeCreateOrUpdateSamples { .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) .withSshSettings( new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withCustomServices( + Arrays + .asList( + new CustomService() + .withName("rstudio") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "test_variable", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("test_value") + .withAdditionalProperties(mapOf()))) + .withDocker( + new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(8787))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(false) + .withSource("/home/azureuser/cloudfiles") + .withTarget("/home/azureuser/cloudfiles"))) + .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) .withPersonalComputeInstanceSettings( new PersonalComputeInstanceSettings() @@ -1279,7 +1635,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -1299,7 +1655,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -1326,7 +1682,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -1344,6 +1700,7 @@ public final class ComputeCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1365,7 +1722,7 @@ import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction /** Samples for Compute Delete. */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/delete.json */ /** * Sample code: Delete Compute. @@ -1391,7 +1748,7 @@ public final class ComputeDeleteSamples { /** Samples for Compute Get. */ public final class ComputeGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -1405,7 +1762,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -1419,7 +1776,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -1433,7 +1790,7 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. @@ -1454,7 +1811,7 @@ public final class ComputeGetSamples { /** Samples for Compute List. */ public final class ComputeListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/list.json */ /** * Sample code: Get Computes. @@ -1473,7 +1830,7 @@ public final class ComputeListSamples { /** Samples for Compute ListKeys. */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. @@ -1494,7 +1851,7 @@ public final class ComputeListKeysSamples { /** Samples for Compute ListNodes. */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. @@ -1514,7 +1871,7 @@ public final class ComputeListNodesSamples { /** Samples for Compute Restart. */ public final class ComputeRestartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. @@ -1534,7 +1891,7 @@ public final class ComputeRestartSamples { /** Samples for Compute Start. */ public final class ComputeStartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. @@ -1554,7 +1911,7 @@ public final class ComputeStartSamples { /** Samples for Compute Stop. */ public final class ComputeStopSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. @@ -1579,7 +1936,7 @@ import java.time.Duration; /** Samples for Compute Update. */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. @@ -1610,6 +1967,7 @@ public final class ComputeUpdateSamples { ### DataContainers_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; @@ -1618,28 +1976,32 @@ import java.util.Map; /** Samples for DataContainers CreateOrUpdate. */ public final class DataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Container. + * Sample code: CreateOrUpdate Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataContainer( + public static void createOrUpdateWorkspaceDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new DataContainerProperties() - .withDescription("string") - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "datacontainer123", + new DataContainerInner() + .withProperties( + new DataContainerProperties() + .withDescription("string") + .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDataType(DataType.fromString("UriFile"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1659,14 +2021,15 @@ public final class DataContainersCreateOrUpdateSamples { /** Samples for DataContainers Delete. */ public final class DataContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/delete.json */ /** - * Sample code: Delete Data Container. + * Sample code: Delete Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); @@ -1680,14 +2043,15 @@ public final class DataContainersDeleteSamples { /** Samples for DataContainers Get. */ public final class DataContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/get.json */ /** - * Sample code: Get Data Container. + * Sample code: Get Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); @@ -1701,14 +2065,15 @@ public final class DataContainersGetSamples { /** Samples for DataContainers List. */ public final class DataContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/list.json */ /** - * Sample code: List Data Container. + * Sample code: List Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); } } @@ -1717,6 +2082,7 @@ public final class DataContainersListSamples { ### DataVersions_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; import java.util.HashMap; import java.util.Map; @@ -1724,29 +2090,34 @@ import java.util.Map; /** Samples for DataVersions CreateOrUpdate. */ public final class DataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Version Base. + * Sample code: CreateOrUpdate Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataVersionBase( + public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties( - new UriFileDataVersion() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("string")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DataVersionBaseInner() + .withProperties( + new UriFileDataVersion() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withDataUri("string")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1766,14 +2137,15 @@ public final class DataVersionsCreateOrUpdateSamples { /** Samples for DataVersions Delete. */ public final class DataVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/delete.json */ /** - * Sample code: Delete Data Version Base. + * Sample code: Delete Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -1787,14 +2159,15 @@ public final class DataVersionsDeleteSamples { /** Samples for DataVersions Get. */ public final class DataVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/get.json */ /** - * Sample code: Get Data Version Base. + * Sample code: Get Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -1808,14 +2181,15 @@ public final class DataVersionsGetSamples { /** Samples for DataVersions List. */ public final class DataVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/list.json */ /** - * Sample code: List Data Version Base. + * Sample code: List Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .list( @@ -1832,6 +2206,39 @@ public final class DataVersionsListSamples { } ``` +### DataVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for DataVersions Publish. */ +public final class DataVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/publish.json + */ + /** + * Sample code: Publish Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .dataVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Datastores_CreateOrUpdate ```java @@ -1850,7 +2257,7 @@ import java.util.UUID; /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -1881,7 +2288,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -1915,7 +2322,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -1944,7 +2351,7 @@ public final class DatastoresCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -1972,6 +2379,7 @@ public final class DatastoresCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1991,7 +2399,7 @@ public final class DatastoresCreateOrUpdateSamples { /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. @@ -2012,7 +2420,7 @@ public final class DatastoresDeleteSamples { /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/get.json */ /** * Sample code: Get datastore. @@ -2033,7 +2441,7 @@ import java.util.Arrays; /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/list.json */ /** * Sample code: List datastores. @@ -2064,7 +2472,7 @@ public final class DatastoresListSamples { /** Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. @@ -2082,6 +2490,7 @@ public final class DatastoresListSecretsSamples { ### EnvironmentContainers_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; @@ -2089,29 +2498,45 @@ import java.util.Map; /** Samples for EnvironmentContainers CreateOrUpdate. */ public final class EnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Container. + * Sample code: CreateOrUpdate Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentContainer( + public static void createOrUpdateWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerProperties() - .withDescription("string") + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testEnvironment", + new EnvironmentContainerInner() .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); - } + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string")) + .withTags( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string"))), + com.azure.core.util.Context.NONE); + } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2131,14 +2556,14 @@ public final class EnvironmentContainersCreateOrUpdateSamples { /** Samples for EnvironmentContainers Delete. */ public final class EnvironmentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Environment Container. + * Sample code: Delete Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentContainer( + public static void deleteWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() @@ -2153,14 +2578,14 @@ public final class EnvironmentContainersDeleteSamples { /** Samples for EnvironmentContainers Get. */ public final class EnvironmentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/get.json */ /** - * Sample code: Get Environment Container. + * Sample code: Get Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentContainer( + public static void getWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() @@ -2175,14 +2600,14 @@ public final class EnvironmentContainersGetSamples { /** Samples for EnvironmentContainers List. */ public final class EnvironmentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/list.json */ /** - * Sample code: List Environment Container. + * Sample code: List Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentContainer( + public static void listWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() @@ -2194,6 +2619,7 @@ public final class EnvironmentContainersListSamples { ### EnvironmentVersions_CreateOrUpdate ```java +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; @@ -2204,40 +2630,45 @@ import java.util.Map; /** Samples for EnvironmentVersions CreateOrUpdate. */ public final class EnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Version. + * Sample code: CreateOrUpdate Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentVersion( + public static void createOrUpdateWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties( - new EnvironmentVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withBuild( - new BuildContext() - .withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withCondaFile("string") - .withImage("docker.io/tensorflow/serving:latest") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new EnvironmentVersionInner() + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2257,14 +2688,14 @@ public final class EnvironmentVersionsCreateOrUpdateSamples { /** Samples for EnvironmentVersions Delete. */ public final class EnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/delete.json */ /** - * Sample code: Delete Environment Version. + * Sample code: Delete Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentVersion( + public static void deleteWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() @@ -2279,14 +2710,15 @@ public final class EnvironmentVersionsDeleteSamples { /** Samples for EnvironmentVersions Get. */ public final class EnvironmentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/get.json */ /** - * Sample code: Get Environment Version. + * Sample code: Get Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); @@ -2300,14 +2732,14 @@ public final class EnvironmentVersionsGetSamples { /** Samples for EnvironmentVersions List. */ public final class EnvironmentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/list.json */ /** - * Sample code: List Environment Version. + * Sample code: List Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentVersion( + public static void listWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() @@ -2316,301 +2748,347 @@ public final class EnvironmentVersionsListSamples { } ``` -### Jobs_Cancel +### EnvironmentVersions_Publish ```java -/** Samples for Jobs Cancel. */ -public final class JobsCancelSamples { +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for EnvironmentVersions Publish. */ +public final class EnvironmentVersionsPublishSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/publish.json */ /** - * Sample code: Cancel Job. + * Sample code: Publish Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().cancel("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void publishWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .environmentVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); } } ``` -### Jobs_CreateOrUpdate +### Features_Get ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.AmlToken; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.CommandJob; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -import com.azure.resourcemanager.machinelearning.models.Mpi; -import com.azure.resourcemanager.machinelearning.models.Objective; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.SweepJob; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrialComponent; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import java.io.IOException; -import java.time.Duration; -import java.util.Arrays; +/** Samples for Features Get. */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Feature/get.json + */ + /** + * Sample code: Get Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .features() + .getWithResponse( + "test-rg", "my-aml-workspace", "string", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Features_List + +```java +/** Samples for Features List. */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Feature/list.json + */ + /** + * Sample code: List Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .features() + .list( + "test-rg", + "my-aml-workspace", + "string", + "string", + null, + "string", + "string", + "string", + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for Jobs CreateOrUpdate. */ -public final class JobsCreateOrUpdateSamples { +/** Samples for FeaturesetContainers CreateOrUpdate. */ +public final class FeaturesetContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate AutoML Job. + * Sample code: CreateOrUpdate Workspace Featureset Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { + public static void createOrUpdateWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() + .featuresetContainers() .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new AutoMLJob() + new FeaturesetContainerProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withIdentity(new AmlToken()) - .withIsArchived(false) - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("string"))) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withTaskDetails( - new ImageClassification() - .withTargetColumnName("string") - .withTrainingData(new MLTableJobInput().withUri("string")) - .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withValidationCropSize("choice(2, 360)"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) + .withIsArchived(false)) .create(); } + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### FeaturesetContainers_Delete + +```java +/** Samples for FeaturesetContainers Delete. */ +public final class FeaturesetContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/delete.json */ /** - * Sample code: CreateOrUpdate Sweep Job. + * Sample code: Delete Workspace Featureset Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { + public static void deleteWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new SweepJob() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withEarlyTermination(new MedianStoppingPolicy().withDelayEvaluation(1).withEvaluationInterval(1)) - .withLimits( - new SweepJobLimits() - .withMaxConcurrentTrials(1) - .withMaxTotalTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withObjective(new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("string")) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withSearchSpace( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) - .withTrial( - new TrialComponent() - .withCodeId("fakeTokenPlaceholder") - .withCommand("string") - .withDistribution(new Mpi().withProcessCountPerInstance(1)) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", - Object.class, - SerializerEncoding.JSON)))))) - .create(); + .featuresetContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } +} +``` + +### FeaturesetContainers_GetEntity +```java +/** Samples for FeaturesetContainers GetEntity. */ +public final class FeaturesetContainersGetEntitySamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/getEntity.json */ /** - * Sample code: CreateOrUpdate Pipeline Job. + * Sample code: GetEntity Workspace Featureset Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdatePipelineJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + public static void getEntityWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new PipelineJob() + .featuresetContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturesetContainers List. */ +public final class FeaturesetContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/list.json + */ + /** + * Sample code: List Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetContainers() + .list( + "test-rg", + "my-aml-workspace", + null, + "string", + ListViewType.ARCHIVED_ONLY, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetVersions_Backfill + +```java +import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturesetVersions Backfill. */ +public final class FeaturesetVersionsBackfillSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/backfill.json + */ + /** + * Sample code: Backfill Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void backfillWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .backfill( + "test-rg", + "my-aml-workspace", + "string", + "string", + new FeaturesetVersionBackfillRequest() + .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") .withDisplayName("string") - .withExperimentName("string") - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.UPLOAD) - .withUri("string"))) - .withSettings( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON))) - .create(); + .withFeatureWindow( + new FeatureWindow() + .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) + .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) + .withJobId("string") + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSparkConfiguration(mapOf("string", "string")) + .withTags(mapOf("string", "string")), + com.azure.core.util.Context.NONE); + } + + // 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; } +} +``` +### FeaturesetVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; +import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; +import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; +import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; +import com.azure.resourcemanager.machinelearning.models.WeekDay; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturesetVersions CreateOrUpdate. */ +public final class FeaturesetVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Command Job. + * Sample code: CreateOrUpdate Workspace Featureset Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCommandJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + public static void createOrUpdateWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() + .featuresetVersions() .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") + .withExistingFeatureset("test-rg", "my-aml-workspace", "string") .withProperties( - new CommandJob() + new FeaturesetVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withIdentity(new AmlToken()) - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withCodeId("fakeTokenPlaceholder") - .withCommand("string") - .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("string"))) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", - Object.class, - SerializerEncoding.JSON))))) + .withIsAnonymous(false) + .withIsArchived(false) + .withEntities(Arrays.asList("string")) + .withMaterializationSettings( + new MaterializationSettings() + .withNotification( + new NotificationSetting() + .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("string"))) + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSchedule( + new RecurrenceTrigger() + .withEndTime("string") + .withStartTime("string") + .withTimeZone("string") + .withFrequency(RecurrenceFrequency.DAY) + .withInterval(1) + .withSchedule( + new RecurrenceSchedule() + .withHours(Arrays.asList(1)) + .withMinutes(Arrays.asList(1)) + .withMonthDays(Arrays.asList(1)) + .withWeekDays(Arrays.asList(WeekDay.MONDAY)))) + .withSparkConfiguration(mapOf("string", "string")) + .withStoreType(MaterializationStoreType.ONLINE)) + .withSpecification(new FeaturesetSpecification().withPath("string")) + .withStage("string")) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2624,171 +3102,2908 @@ public final class JobsCreateOrUpdateSamples { } ``` -### Jobs_Delete +### FeaturesetVersions_Delete ```java -/** Samples for Jobs Delete. */ -public final class JobsDeleteSamples { +/** Samples for FeaturesetVersions Delete. */ +public final class FeaturesetVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/delete.json */ /** - * Sample code: Delete Job. + * Sample code: Delete Workspace Featureset Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### Jobs_Get +### FeaturesetVersions_Get ```java -/** Samples for Jobs Get. */ -public final class JobsGetSamples { +/** Samples for FeaturesetVersions Get. */ +public final class FeaturesetVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/get.json */ /** - * Sample code: Get Command Job. + * Sample code: Get Workspace Featureset Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void getWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } +} +``` +### FeaturesetVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturesetVersions List. */ +public final class FeaturesetVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/list.json */ /** - * Sample code: Get AutoML Job. + * Sample code: List Workspace Featureset Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void listWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + null, + "string", + ListViewType.ALL, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } +} +``` + +### FeaturestoreEntityContainers_CreateOrUpdate +```java +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturestoreEntityContainers CreateOrUpdate. */ +public final class FeaturestoreEntityContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json */ /** - * Sample code: Get Sweep Job. + * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new FeaturestoreEntityContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsArchived(false)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } +} +``` + +### FeaturestoreEntityContainers_Delete +```java +/** Samples for FeaturestoreEntityContainers Delete. */ +public final class FeaturestoreEntityContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/delete.json */ /** - * Sample code: Get Pipeline Job. + * Sample code: Delete Workspace Featurestore Entity Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` -### Jobs_List +### FeaturestoreEntityContainers_GetEntity + +```java +/** Samples for FeaturestoreEntityContainers GetEntity. */ +public final class FeaturestoreEntityContainersGetEntitySamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + */ + /** + * Sample code: GetEntity Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEntityWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturestoreEntityContainers List. */ +public final class FeaturestoreEntityContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/list.json + */ + /** + * Sample code: List Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .list( + "test-rg", + "my-aml-workspace", + null, + "string", + ListViewType.ALL, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeatureDataType; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; +import com.azure.resourcemanager.machinelearning.models.IndexColumn; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturestoreEntityVersions CreateOrUpdate. */ +public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .define("string") + .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") + .withProperties( + new FeaturestoreEntityVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withIndexColumns( + Arrays + .asList(new IndexColumn().withColumnName("string").withDataType(FeatureDataType.DATETIME)))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### FeaturestoreEntityVersions_Delete + +```java +/** Samples for FeaturestoreEntityVersions Delete. */ +public final class FeaturestoreEntityVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/delete.json + */ + /** + * Sample code: Delete Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityVersions_Get + +```java +/** Samples for FeaturestoreEntityVersions Get. */ +public final class FeaturestoreEntityVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/get.json + */ + /** + * Sample code: Get Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturestoreEntityVersions List. */ +public final class FeaturestoreEntityVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/list.json + */ + /** + * Sample code: List Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + null, + "string", + ListViewType.ACTIVE_ONLY, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_Cancel + +```java +/** Samples for Jobs Cancel. */ +public final class JobsCancelSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/cancel.json + */ + /** + * Sample code: Cancel Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().cancel("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_CreateOrUpdate + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.AmlToken; +import com.azure.resourcemanager.machinelearning.models.AutoMLJob; +import com.azure.resourcemanager.machinelearning.models.CommandJob; +import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; +import com.azure.resourcemanager.machinelearning.models.Goal; +import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; +import com.azure.resourcemanager.machinelearning.models.ImageClassification; +import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; +import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; +import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; +import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; +import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; +import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; +import com.azure.resourcemanager.machinelearning.models.Mpi; +import com.azure.resourcemanager.machinelearning.models.Objective; +import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PipelineJob; +import com.azure.resourcemanager.machinelearning.models.SweepJob; +import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; +import com.azure.resourcemanager.machinelearning.models.TensorFlow; +import com.azure.resourcemanager.machinelearning.models.TrialComponent; +import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; +import java.io.IOException; +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Jobs CreateOrUpdate. */ +public final class JobsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate AutoML Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) + throws IOException { + manager + .jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new AutoMLJob() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("string") + .withExperimentName("string") + .withIdentity(new AmlToken()) + .withIsArchived(false) + .withServices( + mapOf( + "string", + new JobService() + .withEndpoint("string") + .withJobServiceType("string") + .withPort(1) + .withProperties(mapOf("string", "string")))) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withOutputs( + mapOf( + "string", + new UriFileJobOutput() + .withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withResources( + new JobResourceConfiguration() + .withInstanceCount(1) + .withInstanceType("string") + .withProperties( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", + Object.class, + SerializerEncoding.JSON)))) + .withTaskDetails( + new ImageClassification() + .withTargetColumnName("string") + .withTrainingData(new MLTableJobInput().withUri("string")) + .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) + .withSearchSpace( + Arrays + .asList( + new ImageModelDistributionSettingsClassification() + .withValidationCropSize("choice(2, 360)"))) + .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Sweep Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) + throws IOException { + manager + .jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new SweepJob() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("string") + .withExperimentName("string") + .withServices( + mapOf( + "string", + new JobService() + .withEndpoint("string") + .withJobServiceType("string") + .withPort(1) + .withProperties(mapOf("string", "string")))) + .withEarlyTermination(new MedianStoppingPolicy().withDelayEvaluation(1).withEvaluationInterval(1)) + .withLimits( + new SweepJobLimits() + .withMaxConcurrentTrials(1) + .withMaxTotalTrials(1) + .withTrialTimeout(Duration.parse("PT1S"))) + .withObjective(new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("string")) + .withSamplingAlgorithm(new GridSamplingAlgorithm()) + .withSearchSpace( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) + .withTrial( + new TrialComponent() + .withCodeId("fakeTokenPlaceholder") + .withCommand("string") + .withDistribution(new Mpi().withProcessCountPerInstance(1)) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withResources( + new JobResourceConfiguration() + .withInstanceCount(1) + .withInstanceType("string") + .withProperties( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", + Object.class, + SerializerEncoding.JSON)))))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Pipeline Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdatePipelineJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager + .jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new PipelineJob() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("string") + .withExperimentName("string") + .withServices( + mapOf( + "string", + new JobService() + .withEndpoint("string") + .withJobServiceType("string") + .withPort(1) + .withProperties(mapOf("string", "string")))) + .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) + .withOutputs( + mapOf( + "string", + new UriFileJobOutput() + .withDescription("string") + .withMode(OutputDeliveryMode.UPLOAD) + .withUri("string"))) + .withSettings( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Command Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateCommandJob( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager + .jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new CommandJob() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("string") + .withExperimentName("string") + .withIdentity(new AmlToken()) + .withServices( + mapOf( + "string", + new JobService() + .withEndpoint("string") + .withJobServiceType("string") + .withPort(1) + .withProperties(mapOf("string", "string")))) + .withCodeId("fakeTokenPlaceholder") + .withCommand("string") + .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) + .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) + .withOutputs( + mapOf( + "string", + new UriFileJobOutput() + .withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withResources( + new JobResourceConfiguration() + .withInstanceCount(1) + .withInstanceType("string") + .withProperties( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", + Object.class, + SerializerEncoding.JSON))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Jobs_Delete + +```java +/** Samples for Jobs Delete. */ +public final class JobsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/delete.json + */ + /** + * Sample code: Delete Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .jobs() + .delete( + "test-rg", + "my-aml-workspace", + "http://subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/my-favorite-aml-job", + com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_Get + +```java +/** Samples for Jobs Get. */ +public final class JobsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/get.json + */ + /** + * Sample code: Get Command Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/get.json + */ + /** + * Sample code: Get AutoML Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/get.json + */ + /** + * Sample code: Get Sweep Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/get.json + */ + /** + * Sample code: Get Pipeline Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_List + +```java +/** Samples for Jobs List. */ +public final class JobsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/list.json + */ + /** + * Sample code: List Command Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .jobs() + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/list.json + */ + /** + * Sample code: List Pipeline Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .jobs() + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/list.json + */ + /** + * Sample code: List Sweep Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .jobs() + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/list.json + */ + /** + * Sample code: List AutoML Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .jobs() + .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkProvisions_ProvisionManagedNetwork + +```java +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; + +/** Samples for ManagedNetworkProvisions ProvisionManagedNetwork. */ +public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/provision.json + */ + /** + * Sample code: Provision ManagedNetwork. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void provisionManagedNetwork( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkProvisions() + .provisionManagedNetwork( + "test-rg", + "aml-workspace-name", + new ManagedNetworkProvisionOptions().withIncludeSpark(false), + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkSettingsRule_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; + +/** Samples for ManagedNetworkSettingsRule CreateOrUpdate. */ +public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/createOrUpdateRule.json + */ + /** + * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .define("rule_name_1") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties( + new FqdnOutboundRule() + .withCategory(RuleCategory.USER_DEFINED) + .withStatus(RuleStatus.ACTIVE) + .withDestination("destination_endpoint")) + .create(); + } +} +``` + +### ManagedNetworkSettingsRule_Delete + +```java +/** Samples for ManagedNetworkSettingsRule Delete. */ +public final class ManagedNetworkSettingsRuleDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/deleteRule.json + */ + /** + * Sample code: Delete ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .delete("test-rg", "aml-workspace-name", "rule-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkSettingsRule_Get + +```java +/** Samples for ManagedNetworkSettingsRule Get. */ +public final class ManagedNetworkSettingsRuleGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/getRule.json + */ + /** + * Sample code: Get ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .getWithResponse( + "test-rg", "aml-workspace-name", "name_of_the_fqdn_rule", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkSettingsRule_List + +```java +/** Samples for ManagedNetworkSettingsRule List. */ +public final class ManagedNetworkSettingsRuleListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/listRule.json + */ + /** + * Sample code: List ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsRules().list("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ModelContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ModelContainers CreateOrUpdate. */ +public final class ModelContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelContainers() + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "testContainer", + new ModelContainerInner() + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + com.azure.core.util.Context.NONE); + } + + // 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; + } +} +``` + +### ModelContainers_Delete + +```java +/** Samples for ModelContainers Delete. */ +public final class ModelContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/delete.json + */ + /** + * Sample code: Delete Workspace Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelContainers() + .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### ModelContainers_Get + +```java +/** Samples for ModelContainers Get. */ +public final class ModelContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/get.json + */ + /** + * Sample code: Get Workspace Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelContainers() + .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### ModelContainers_List + +```java +/** Samples for ModelContainers List. */ +public final class ModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/list.json + */ + /** + * Sample code: List Workspace Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.modelContainers().list("testrg123", "workspace123", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ModelVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.FlavorData; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ModelVersions CreateOrUpdate. */ +public final class ModelVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ModelVersionInner() + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")), + com.azure.core.util.Context.NONE); + } + + // 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; + } +} +``` + +### ModelVersions_Delete + +```java +/** Samples for ModelVersions Delete. */ +public final class ModelVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/delete.json + */ + /** + * Sample code: Delete Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ModelVersions_Get + +```java +/** Samples for ModelVersions Get. */ +public final class ModelVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/get.json + */ + /** + * Sample code: Get Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ModelVersions_List + +```java +/** Samples for ModelVersions List. */ +public final class ModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/list.json + */ + /** + * Sample code: List Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + null, + "string", + 1, + "string", + "string", + 1, + "string", + "string", + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ModelVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for ModelVersions Publish. */ +public final class ModelVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/publish.json + */ + /** + * Sample code: Publish Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; +import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; +import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; +import com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment; +import com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; +import com.azure.resourcemanager.machinelearning.models.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OnlineDeployments CreateOrUpdate. */ +public final class OnlineDeploymentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Kubernetes Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateKubernetesOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .define("testDeploymentName") + .withRegion("string") + .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") + .withProperties( + new KubernetesOnlineDeployment() + .withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withProperties(mapOf("string", "string")) + .withAppInsightsEnabled(false) + .withInstanceType("string") + .withLivenessProbe( + new ProbeSettings() + .withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withRequestSettings( + new OnlineRequestSettings() + .withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings()) + .withContainerResourceRequirements( + new ContainerResourceRequirements() + .withContainerResourceLimits( + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) + .withContainerResourceRequests( + new ContainerResourceSettings() + .withCpu("\"1\"") + .withGpu("\"1\"") + .withMemory("\"2Gi\"")))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Managed Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateManagedOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .define("testDeploymentName") + .withRegion("string") + .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") + .withProperties( + new ManagedOnlineDeployment() + .withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withProperties(mapOf("string", "string")) + .withAppInsightsEnabled(false) + .withInstanceType("string") + .withLivenessProbe( + new ProbeSettings() + .withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withReadinessProbe( + new ProbeSettings() + .withFailureThreshold(30) + .withInitialDelay(Duration.parse("PT1S")) + .withPeriod(Duration.parse("PT10S")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT2S"))) + .withRequestSettings( + new OnlineRequestSettings() + .withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings())) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OnlineDeployments_Delete + +```java +/** Samples for OnlineDeployments Delete. */ +public final class OnlineDeploymentsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineDeployment/delete.json + */ + /** + * Sample code: Delete Workspace Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .delete("testrg123", "workspace123", "testEndpoint", "testDeployment", com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_Get + +```java +/** Samples for OnlineDeployments Get. */ +public final class OnlineDeploymentsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + */ + /** + * Sample code: Get Kubernetes Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getKubernetesOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .getWithResponse( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + */ + /** + * Sample code: Get Managed Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getManagedOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .getWithResponse( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_GetLogs + +```java +import com.azure.resourcemanager.machinelearning.models.ContainerType; +import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; + +/** Samples for OnlineDeployments GetLogs. */ +public final class OnlineDeploymentsGetLogsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/getLogs.json + */ + /** + * Sample code: Get Online Deployment Logs. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getOnlineDeploymentLogs( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .getLogsWithResponse( + "testrg123", + "workspace123", + "testEndpoint", + "testDeployment", + new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(0), + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_List + +```java +/** Samples for OnlineDeployments List. */ +public final class OnlineDeploymentsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/list.json + */ + /** + * Sample code: List Online Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listOnlineDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .list( + "test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_ListSkus + +```java +/** Samples for OnlineDeployments ListSkus. */ +public final class OnlineDeploymentsListSkusSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + */ + /** + * Sample code: List Managed Online Deployment Skus. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listManagedOnlineDeploymentSkus( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .listSkus( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + 1, + null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + */ + /** + * Sample code: List Kubernetes Online Deployment Skus. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listKubernetesOnlineDeploymentSkus( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineDeployments() + .listSkus( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + 1, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineDeployments_Update + +```java +import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OnlineDeployments Update. */ +public final class OnlineDeploymentsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + */ + /** + * Sample code: Update Managed Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateManagedOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = + manager + .onlineDeployments() + .getWithResponse( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) + .apply(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + */ + /** + * Sample code: Update Kubernetes Online Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateKubernetesOnlineDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + OnlineDeployment resource = + manager + .onlineDeployments() + .getWithResponse( + "test-rg", + "my-aml-workspace", + "testEndpointName", + "testDeploymentName", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OnlineEndpoints_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OnlineEndpoints CreateOrUpdate. */ +public final class OnlineEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .define("testEndpointName") + .withRegion("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new OnlineEndpointProperties() + .withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withCompute("string") + .withTraffic(mapOf("string", 1))) + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### OnlineEndpoints_Delete + +```java +/** Samples for OnlineEndpoints Delete. */ +public final class OnlineEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/delete.json + */ + /** + * Sample code: Delete Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_Get + +```java +/** Samples for OnlineEndpoints Get. */ +public final class OnlineEndpointsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/get.json + */ + /** + * Sample code: Get Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_GetToken + +```java +/** Samples for OnlineEndpoints GetToken. */ +public final class OnlineEndpointsGetTokenSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/getToken.json + */ + /** + * Sample code: GetToken Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getTokenWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_List + +```java +import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** Samples for OnlineEndpoints List. */ +public final class OnlineEndpointsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/list.json + */ + /** + * Sample code: List Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .list( + "test-rg", + "my-aml-workspace", + "string", + 1, + EndpointComputeType.MANAGED, + null, + "string", + "string", + OrderString.CREATED_AT_DESC, + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_ListKeys + +```java +/** Samples for OnlineEndpoints ListKeys. */ +public final class OnlineEndpointsListKeysSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/listKeys.json + */ + /** + * Sample code: ListKeys Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listKeysWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_RegenerateKeys + +```java +import com.azure.resourcemanager.machinelearning.models.KeyType; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; + +/** Samples for OnlineEndpoints RegenerateKeys. */ +public final class OnlineEndpointsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/regenerateKeys.json + */ + /** + * Sample code: RegenerateKeys Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void regenerateKeysWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .onlineEndpoints() + .regenerateKeys( + "test-rg", + "my-aml-workspace", + "testEndpointName", + new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + +### OnlineEndpoints_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for OnlineEndpoints Update. */ +public final class OnlineEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/update.json + */ + /** + * Sample code: Update Workspace Online Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + OnlineEndpoint resource = + manager + .onlineEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new PartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "string", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/operationsList.json + */ + /** + * Sample code: OperationsList. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void operationsList(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/createOrUpdate.json + */ + /** + * Sample code: WorkspacePutPrivateEndpointConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void workspacePutPrivateEndpointConnection( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .privateEndpointConnections() + .define("{privateEndpointConnectionName}") + .withExistingWorkspace("rg-1234", "testworkspace") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Auto-Approved")) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/delete.json + */ + /** + * Sample code: WorkspaceDeletePrivateEndpointConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void workspaceDeletePrivateEndpointConnection( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .privateEndpointConnections() + .deleteWithResponse( + "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/get.json + */ + /** + * Sample code: WorkspaceGetPrivateEndpointConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void workspaceGetPrivateEndpointConnection( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .privateEndpointConnections() + .getWithResponse( + "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** Samples for PrivateEndpointConnections List. */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/list.json + */ + /** + * Sample code: StorageAccountListPrivateEndpointConnections. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void storageAccountListPrivateEndpointConnections( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.privateEndpointConnections().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +/** Samples for PrivateLinkResources List. */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateLinkResource/list.json + */ + /** + * Sample code: WorkspaceListPrivateLinkResources. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void workspaceListPrivateLinkResources( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### Quotas_List + +```java +/** Samples for Quotas List. */ +public final class QuotasListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Quota/list.json + */ + /** + * Sample code: List workspace quotas by VMFamily. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceQuotasByVMFamily( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.quotas().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### Quotas_Update + +```java +import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; +import com.azure.resourcemanager.machinelearning.models.QuotaUnit; +import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; +import java.util.Arrays; + +/** Samples for Quotas Update. */ +public final class QuotasUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Quota/update.json + */ + /** + * Sample code: update quotas. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateQuotas(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .quotas() + .updateWithResponse( + "eastus", + new QuotaUpdateParameters() + .withValue( + Arrays + .asList( + new QuotaBaseProperties() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") + .withType("Microsoft.MachineLearningServices/workspaces/quotas") + .withLimit(100L) + .withUnit(QuotaUnit.COUNT), + new QuotaBaseProperties() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") + .withType("Microsoft.MachineLearningServices/workspaces/quotas") + .withLimit(200L) + .withUnit(QuotaUnit.COUNT))), + com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries CreateOrUpdate. */ +public final class RegistriesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/createOrUpdate-SystemCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountName("string") + .withAcrAccountSku("string") + .withArmResourceId(new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withAllowBlobPublicAccess(false) + .withArmResourceId(new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("string") + .withStorageAccountType("string")))))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/createOrUpdate-UserCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId(new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Registries_Delete + +```java +/** Samples for Registries Delete. */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/delete.json + */ + /** + * Sample code: Delete Registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().delete("test-rg", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_GetByResourceGroup + +```java +/** Samples for Registries GetByResourceGroup. */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/get-UserCreated.json + */ + /** + * Sample code: Get Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/get-SystemCreated.json + */ + /** + * Sample code: Get Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_List + +```java +/** Samples for Registries List. */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/listBySubscription.json + */ + /** + * Sample code: List registries by subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesBySubscription( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_ListByResourceGroup + +```java +/** Samples for Registries ListByResourceGroup. */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/list-UserCreated.json + */ + /** + * Sample code: List registries with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/list-SystemCreated.json + */ + /** + * Sample code: List registries with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### Registries_RemoveRegions + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries RemoveRegions. */ +public final class RegistriesRemoveRegionsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/removeRegions.json + */ + /** + * Sample code: Remove regions from registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void removeRegionsFromRegistry( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .removeRegions( + "test-rg", + "string", + new RegistryInner() + .withLocation("string") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountName("string") + .withAcrAccountSku("string") + .withArmResourceId( + new ArmResourceId().withResourceId("string"))) + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withAllowBlobPublicAccess(false) + .withArmResourceId( + new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("string") + .withStorageAccountType("string")) + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))))), + com.azure.core.util.Context.NONE); + } + + // 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; + } +} +``` + +### Registries_Update + +```java +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries Update. */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/update-UserCreated.json + */ + /** + * Sample code: Update Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + Registry resource = + manager + .registries() + .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new RegistryPartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) + .apply(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/update-SystemCreated.json + */ + /** + * Sample code: Update Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + Registry resource = + manager + .registries() + .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new RegistryPartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeContainers CreateOrUpdate. */ +public final class RegistryCodeContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeContainers_Delete + +```java +/** Samples for RegistryCodeContainers Delete. */ +public final class RegistryCodeContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/delete.json + */ + /** + * Sample code: Delete Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryCodeContainers_Get + +```java +/** Samples for RegistryCodeContainers Get. */ +public final class RegistryCodeContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/get.json + */ + /** + * Sample code: Get Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .getWithResponse("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryCodeContainers_List + +```java +/** Samples for RegistryCodeContainers List. */ +public final class RegistryCodeContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/list.json + */ + /** + * Sample code: List Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().list("testrg123", "testregistry", null, com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryCodeVersions_CreateOrGetStartPendingUpload + +```java +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryCodeVersions CreateOrGetStartPendingUpload. */ +public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), + com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryCodeVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeVersions CreateOrUpdate. */ +public final class RegistryCodeVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .define("string") + .withExistingCode("test-rg", "my-aml-registry", "string") + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("fakeTokenPlaceholder")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### RegistryCodeVersions_Delete ```java -/** Samples for Jobs List. */ -public final class JobsListSamples { +/** Samples for RegistryCodeVersions Delete. */ +public final class RegistryCodeVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/delete.json */ /** - * Sample code: List Command Job. + * Sample code: Delete Registry Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); + .registryCodeVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json - */ - /** - * Sample code: List Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); - } +### RegistryCodeVersions_Get +```java +/** Samples for RegistryCodeVersions Get. */ +public final class RegistryCodeVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/get.json */ /** - * Sample code: List Sweep Job. + * Sample code: Get Registry Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); + .registryCodeVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } +} +``` +### RegistryCodeVersions_List + +```java +/** Samples for RegistryCodeVersions List. */ +public final class RegistryCodeVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/list.json */ /** - * Sample code: List AutoML Job. + * Sample code: List Registry Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().list("test-rg", "my-aml-workspace", null, null, null, null, com.azure.core.util.Context.NONE); + public static void listRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); } } ``` -### ModelContainers_CreateOrUpdate +### RegistryComponentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for ModelContainers CreateOrUpdate. */ -public final class ModelContainersCreateOrUpdateSamples { +/** Samples for RegistryComponentContainers CreateOrUpdate. */ +public final class RegistryComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Container. + * Sample code: CreateOrUpdate Registry Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelContainer( + public static void createOrUpdateRegistryComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") + .registryComponentContainers() + .define("string") + .withExistingRegistry("test-rg", "my-aml-registry") .withProperties( - new ModelContainerProperties() - .withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2802,103 +6017,115 @@ public final class ModelContainersCreateOrUpdateSamples { } ``` -### ModelContainers_Delete +### RegistryComponentContainers_Delete ```java -/** Samples for ModelContainers Delete. */ -public final class ModelContainersDeleteSamples { +/** Samples for RegistryComponentContainers Delete. */ +public final class RegistryComponentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/delete.json */ /** - * Sample code: Delete Model Container. + * Sample code: Delete Registry Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelContainers() - .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + .registryComponentContainers() + .delete("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); } } ``` -### ModelContainers_Get +### RegistryComponentContainers_Get ```java -/** Samples for ModelContainers Get. */ -public final class ModelContainersGetSamples { +/** Samples for RegistryComponentContainers Get. */ +public final class RegistryComponentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/get.json */ /** - * Sample code: Get Model Container. + * Sample code: Get Registry Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelContainers() - .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + .registryComponentContainers() + .getWithResponse("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); } } ``` -### ModelContainers_List +### RegistryComponentContainers_List ```java -/** Samples for ModelContainers List. */ -public final class ModelContainersListSamples { +/** Samples for RegistryComponentContainers List. */ +public final class RegistryComponentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/list.json */ /** - * Sample code: List Model Container. + * Sample code: List Registry Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers().list("testrg123", "workspace123", null, null, null, com.azure.core.util.Context.NONE); + public static void listRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .list("test-rg", "my-aml-registry", null, com.azure.core.util.Context.NONE); } } ``` -### ModelVersions_CreateOrUpdate +### RegistryComponentVersions_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; +import java.io.IOException; import java.util.HashMap; import java.util.Map; -/** Samples for ModelVersions CreateOrUpdate. */ -public final class ModelVersionsCreateOrUpdateSamples { +/** Samples for RegistryComponentVersions CreateOrUpdate. */ +public final class RegistryComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Version. + * Sample code: CreateOrUpdate Registry Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void createOrUpdateRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager - .modelVersions() + .registryComponentVersions() .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") + .withExistingComponent("test-rg", "my-aml-registry", "string") .withProperties( - new ModelVersionProperties() + new ComponentVersionProperties() .withDescription("string") .withProperties(mapOf("string", "string")) .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType("CustomModel") - .withModelUri("string")) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2912,233 +6139,107 @@ public final class ModelVersionsCreateOrUpdateSamples { } ``` -### ModelVersions_Delete +### RegistryComponentVersions_Delete ```java -/** Samples for ModelVersions Delete. */ -public final class ModelVersionsDeleteSamples { +/** Samples for RegistryComponentVersions Delete. */ +public final class RegistryComponentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/delete.json */ /** - * Sample code: Delete Model Version. + * Sample code: Delete Registry Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + .registryComponentVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### ModelVersions_Get +### RegistryComponentVersions_Get ```java -/** Samples for ModelVersions Get. */ -public final class ModelVersionsGetSamples { +/** Samples for RegistryComponentVersions Get. */ +public final class RegistryComponentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/get.json */ /** - * Sample code: Get Model Version. + * Sample code: Get Registry Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + .registryComponentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### ModelVersions_List +### RegistryComponentVersions_List ```java -/** Samples for ModelVersions List. */ -public final class ModelVersionsListSamples { +/** Samples for RegistryComponentVersions List. */ +public final class RegistryComponentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/list.json */ /** - * Sample code: List Model Version. + * Sample code: List Registry Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .modelVersions() - .list( - "test-rg", - "my-aml-workspace", - "string", - null, - "string", - 1, - "string", - "string", - 1, - "string", - "string", - null, - null, - com.azure.core.util.Context.NONE); + .registryComponentVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_CreateOrUpdate +### RegistryDataContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; -import com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.time.Duration; +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; import java.util.Map; -/** Samples for OnlineDeployments CreateOrUpdate. */ -public final class OnlineDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new KubernetesOnlineDeployment() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withAppInsightsEnabled(false) - .withInstanceType("string") - .withLivenessProbe( - new ProbeSettings() - .withFailureThreshold(1) - .withInitialDelay(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M"))) - .withModel("string") - .withModelMountPath("string") - .withRequestSettings( - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1) - .withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M"))) - .withScaleSettings(new DefaultScaleSettings()) - .withContainerResourceRequirements( - new ContainerResourceRequirements() - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) - .withContainerResourceRequests( - new ContainerResourceSettings() - .withCpu("\"1\"") - .withGpu("\"1\"") - .withMemory("\"2Gi\"")))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - +/** Samples for RegistryDataContainers CreateOrUpdate. */ +public final class RegistryDataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Managed Online Deployment. + * Sample code: CreateOrUpdate Registry Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateManagedOnlineDeployment( + public static void createOrUpdateRegistryDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") + .registryDataContainers() + .define("string") + .withExistingRegistry("test-rg", "registryName") .withProperties( - new ManagedOnlineDeployment() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + new DataContainerProperties() .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withAppInsightsEnabled(false) - .withInstanceType("string") - .withLivenessProbe( - new ProbeSettings() - .withFailureThreshold(1) - .withInitialDelay(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M"))) - .withModel("string") - .withModelMountPath("string") - .withReadinessProbe( - new ProbeSettings() - .withFailureThreshold(30) - .withInitialDelay(Duration.parse("PT1S")) - .withPeriod(Duration.parse("PT10S")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S"))) - .withRequestSettings( - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1) - .withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M"))) - .withScaleSettings(new DefaultScaleSettings())) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) + .withTags(mapOf("string", "string")) + .withIsArchived(false) + .withDataType(DataType.URI_FOLDER)) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3152,322 +6253,298 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { } ``` -### OnlineDeployments_Delete +### RegistryDataContainers_Delete ```java -/** Samples for OnlineDeployments Delete. */ -public final class OnlineDeploymentsDeleteSamples { +/** Samples for RegistryDataContainers Delete. */ +public final class RegistryDataContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/delete.json */ /** - * Sample code: Delete Online Deployment. + * Sample code: Delete Registry Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineDeployment( + public static void deleteRegistryDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .delete("testrg123", "workspace123", "testEndpoint", "testDeployment", com.azure.core.util.Context.NONE); + manager.registryDataContainers().delete("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_Get +### RegistryDataContainers_Get ```java -/** Samples for OnlineDeployments Get. */ -public final class OnlineDeploymentsGetSamples { +/** Samples for RegistryDataContainers Get. */ +public final class RegistryDataContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/get.json */ /** - * Sample code: Get Kubernetes Online Deployment. + * Sample code: Get Registry Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getKubernetesOnlineDeployment( + public static void getRegistryDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + .registryDataContainers() + .getWithResponse("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); } +} +``` +### RegistryDataContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for RegistryDataContainers List. */ +public final class RegistryDataContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/registryList.json */ /** - * Sample code: Get Managed Online Deployment. + * Sample code: RegistryList Registry Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getManagedOnlineDeployment( + public static void registryListRegistryDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + .registryDataContainers() + .list("test-rg", "registryName", null, ListViewType.ALL, com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_GetLogs +### RegistryDataReferences_GetBlobReferenceSas ```java -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; -/** Samples for OnlineDeployments GetLogs. */ -public final class OnlineDeploymentsGetLogsSamples { +/** Samples for RegistryDataReferences GetBlobReferenceSas. */ +public final class RegistryDataReferencesGetBlobReferenceSasSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/DataReference/getBlobReferenceSAS.json */ /** - * Sample code: Get Online Deployment Logs. + * Sample code: GetBlobReferenceSAS Data Reference. * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineDeploymentLogs( + public static void getBlobReferenceSASDataReference( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .getLogsWithResponse( - "testrg123", - "workspace123", - "testEndpoint", - "testDeployment", - new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(0), + .registryDataReferences() + .getBlobReferenceSasWithResponse( + "test-rg", + "registryName", + "string", + "string", + new GetBlobReferenceSasRequestDto() + .withAssetId("string") + .withBlobUri("https://www.contoso.com/example"), com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_List +### RegistryDataVersions_CreateOrGetStartPendingUpload ```java -/** Samples for OnlineDeployments List. */ -public final class OnlineDeploymentsListSamples { +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryDataVersions CreateOrGetStartPendingUpload. */ +public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json */ /** - * Sample code: List Online Deployments. + * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listOnlineDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void createOrGetStartPendingUploadRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .list( - "test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); + .registryDataVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.NONE), + com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_ListSkus +### RegistryDataVersions_CreateOrUpdate ```java -/** Samples for OnlineDeployments ListSkus. */ -public final class OnlineDeploymentsListSkusSamples { +import com.azure.resourcemanager.machinelearning.models.MLTableData; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryDataVersions CreateOrUpdate. */ +public final class RegistryDataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/createOrUpdate.json */ /** - * Sample code: List Managed Online Deployment Skus. + * Sample code: CreateOrUpdate Registry Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listManagedOnlineDeploymentSkus( + public static void createOrUpdateRegistryDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .listSkus( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - 1, - null, - com.azure.core.util.Context.NONE); + .registryDataVersions() + .define("string") + .withExistingData("test-rg", "registryName", "string") + .withProperties( + new MLTableData() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withDataUri("string") + .withReferencedUris(Arrays.asList("string"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } +} +``` +### RegistryDataVersions_Delete + +```java +/** Samples for RegistryDataVersions Delete. */ +public final class RegistryDataVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/delete.json */ /** - * Sample code: List Kubernetes Online Deployment Skus. + * Sample code: Delete Registry Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listKubernetesOnlineDeploymentSkus( + public static void deleteRegistryDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineDeployments() - .listSkus( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - 1, - null, - com.azure.core.util.Context.NONE); + .registryDataVersions() + .delete("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### OnlineDeployments_Update +### RegistryDataVersions_Get ```java -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; - -/** Samples for OnlineDeployments Update. */ -public final class OnlineDeploymentsUpdateSamples { +/** Samples for RegistryDataVersions Get. */ +public final class RegistryDataVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/get.json */ /** - * Sample code: Update Managed Online Deployment. + * Sample code: Get Registry Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void updateManagedOnlineDeployment( + public static void getRegistryDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); + manager + .registryDataVersions() + .getWithResponse("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); } +} +``` + +### RegistryDataVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +/** Samples for RegistryDataVersions List. */ +public final class RegistryDataVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/registryList.json */ /** - * Sample code: Update Kubernetes Online Deployment. + * Sample code: RegistryList Registry Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void updateKubernetesOnlineDeployment( + public static void registryListRegistryDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - @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; + manager + .registryDataVersions() + .list( + "test-rg", + "registryName", + "string", + "string", + 1, + null, + "string", + ListViewType.ARCHIVED_ONLY, + com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_CreateOrUpdate +### RegistryEnvironmentContainers_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for OnlineEndpoints CreateOrUpdate. */ -public final class OnlineEndpointsCreateOrUpdateSamples { +/** Samples for RegistryEnvironmentContainers CreateOrUpdate. */ +public final class RegistryEnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Online Endpoint. + * Sample code: CreateOrUpdate Registry Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateOnlineEndpoint( + public static void createOrUpdateRegistryEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") + .registryEnvironmentContainers() + .define("testEnvironment") + .withExistingRegistry("testrg123", "testregistry") .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.AMLTOKEN) + new EnvironmentContainerProperties() .withDescription("string") - .withProperties(mapOf("string", "string")) - .withCompute("string") - .withTraffic(mapOf("string", 1))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3481,200 +6558,230 @@ public final class OnlineEndpointsCreateOrUpdateSamples { } ``` -### OnlineEndpoints_Delete +### RegistryEnvironmentContainers_Delete ```java -/** Samples for OnlineEndpoints Delete. */ -public final class OnlineEndpointsDeleteSamples { +/** Samples for RegistryEnvironmentContainers Delete. */ +public final class RegistryEnvironmentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Online Endpoint. + * Sample code: Delete Registry Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + .registryEnvironmentContainers() + .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_Get +### RegistryEnvironmentContainers_Get + +```java +/** Samples for RegistryEnvironmentContainers Get. */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .getWithResponse("testrg123", "testregistry", "testEnvironment", com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryEnvironmentContainers_List ```java -/** Samples for OnlineEndpoints Get. */ -public final class OnlineEndpointsGetSamples { +/** Samples for RegistryEnvironmentContainers List. */ +public final class RegistryEnvironmentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/list.json */ /** - * Sample code: Get Online Endpoint. + * Sample code: List Registry Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + .registryEnvironmentContainers() + .list("testrg123", "testregistry", null, null, com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_GetToken +### RegistryEnvironmentVersions_CreateOrUpdate ```java -/** Samples for OnlineEndpoints GetToken. */ -public final class OnlineEndpointsGetTokenSamples { +import com.azure.resourcemanager.machinelearning.models.BuildContext; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentVersions CreateOrUpdate. */ +public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/getToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: GetToken Online Endpoint. + * Sample code: CreateOrUpdate Registry Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getTokenOnlineEndpoint( + public static void createOrUpdateRegistryEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + .registryEnvironmentVersions() + .define("string") + .withExistingEnvironment("test-rg", "my-aml-registry", "string") + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### OnlineEndpoints_List +### RegistryEnvironmentVersions_Delete ```java -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; - -/** Samples for OnlineEndpoints List. */ -public final class OnlineEndpointsListSamples { +/** Samples for RegistryEnvironmentVersions Delete. */ +public final class RegistryEnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/delete.json */ /** - * Sample code: List Online Endpoint. + * Sample code: Delete Registry Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .list( - "test-rg", - "my-aml-workspace", - "string", - 1, - EndpointComputeType.MANAGED, - null, - "string", - "string", - OrderString.CREATED_AT_DESC, - com.azure.core.util.Context.NONE); + .registryEnvironmentVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_ListKeys +### RegistryEnvironmentVersions_Get ```java -/** Samples for OnlineEndpoints ListKeys. */ -public final class OnlineEndpointsListKeysSamples { +/** Samples for RegistryEnvironmentVersions Get. */ +public final class RegistryEnvironmentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/get.json */ /** - * Sample code: ListKeys Online Endpoint. + * Sample code: Get Registry Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysOnlineEndpoint( + public static void getRegistryEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + .registryEnvironmentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_RegenerateKeys +### RegistryEnvironmentVersions_List ```java -import com.azure.resourcemanager.machinelearning.models.KeyType; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** Samples for OnlineEndpoints RegenerateKeys. */ -public final class OnlineEndpointsRegenerateKeysSamples { +/** Samples for RegistryEnvironmentVersions List. */ +public final class RegistryEnvironmentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/list.json */ /** - * Sample code: RegenerateKeys Online Endpoint. + * Sample code: List Registry Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void regenerateKeysOnlineEndpoint( + public static void listRegistryEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .onlineEndpoints() - .regenerateKeys( - "test-rg", - "my-aml-workspace", - "testEndpointName", - new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); + .registryEnvironmentVersions() + .list("test-rg", "my-aml-regsitry", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_Update +### RegistryModelContainers_CreateOrUpdate ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.io.IOException; +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for OnlineEndpoints Update. */ -public final class OnlineEndpointsUpdateSamples { +/** Samples for RegistryModelContainers CreateOrUpdate. */ +public final class RegistryModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/createOrUpdate.json */ /** - * Sample code: Update Online Endpoint. + * Sample code: CreateOrUpdate Registry Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - OnlineEndpoint resource = - manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); + public static void createOrUpdateRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "registry123") + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3688,201 +6795,228 @@ public final class OnlineEndpointsUpdateSamples { } ``` -### Operations_List +### RegistryModelContainers_Delete ```java -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** Samples for RegistryModelContainers Delete. */ +public final class RegistryModelContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/operationsList.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/delete.json */ /** - * Sample code: OperationsList. + * Sample code: Delete Registry Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void operationsList(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void deleteRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .delete("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_CreateOrUpdate +### RegistryModelContainers_Get ```java -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; - -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { +/** Samples for RegistryModelContainers Get. */ +public final class RegistryModelContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/get.json */ /** - * Sample code: WorkspacePutPrivateEndpointConnection. + * Sample code: Get Registry Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void workspacePutPrivateEndpointConnection( + public static void getRegistryModelContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .privateEndpointConnections() - .define("{privateEndpointConnectionName}") - .withExistingWorkspace("rg-1234", "testworkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) - .create(); + .registryModelContainers() + .getWithResponse("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_Delete +### RegistryModelContainers_List ```java -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { +/** Samples for RegistryModelContainers List. */ +public final class RegistryModelContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/list.json */ /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. + * Sample code: List Registry Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceDeletePrivateEndpointConnection( + public static void listRegistryModelContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .privateEndpointConnections() - .deleteWithResponse( - "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + .registryModelContainers() + .list("testrg123", "registry123", null, null, com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_Get +### RegistryModelVersions_CreateOrGetStartPendingUpload ```java -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryModelVersions CreateOrGetStartPendingUpload. */ +public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json */ /** - * Sample code: WorkspaceGetPrivateEndpointConnection. + * Sample code: CreateOrGetStartPendingUpload Registry Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceGetPrivateEndpointConnection( + public static void createOrGetStartPendingUploadRegistryModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .privateEndpointConnections() - .getWithResponse( - "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + .registryModelVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), + com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_List +### RegistryModelVersions_CreateOrUpdate ```java -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { +import com.azure.resourcemanager.machinelearning.models.FlavorData; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelVersions CreateOrUpdate. */ +public final class RegistryModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/createOrUpdate.json */ /** - * Sample code: StorageAccountListPrivateEndpointConnections. + * Sample code: CreateOrUpdate Registry Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void storageAccountListPrivateEndpointConnections( + public static void createOrUpdateRegistryModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager + .registryModelVersions() + .define("string") + .withExistingModel("test-rg", "my-aml-registry", "string") + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### PrivateLinkResources_List +### RegistryModelVersions_Delete ```java -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { +/** Samples for RegistryModelVersions Delete. */ +public final class RegistryModelVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/delete.json */ /** - * Sample code: WorkspaceListPrivateLinkResources. + * Sample code: Delete Registry Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceListPrivateLinkResources( + public static void deleteRegistryModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager + .registryModelVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### Quotas_List +### RegistryModelVersions_Get ```java -/** Samples for Quotas List. */ -public final class QuotasListSamples { +/** Samples for RegistryModelVersions Get. */ +public final class RegistryModelVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/get.json */ /** - * Sample code: List workspace quotas by VMFamily. + * Sample code: Get Registry Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listWorkspaceQuotasByVMFamily( + public static void getRegistryModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.quotas().list("eastus", com.azure.core.util.Context.NONE); + manager + .registryModelVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### Quotas_Update +### RegistryModelVersions_List ```java -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; - -/** Samples for Quotas Update. */ -public final class QuotasUpdateSamples { +/** Samples for RegistryModelVersions List. */ +public final class RegistryModelVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/list.json */ /** - * Sample code: update quotas. + * Sample code: List Registry Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void updateQuotas(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager - .quotas() - .updateWithResponse( - "eastus", - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(100L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(200L) - .withUnit(QuotaUnit.COUNT))), + .registryModelVersions() + .list( + "test-rg", + "my-aml-registry", + "string", + null, + "string", + 1, + "string", + "string", + "string", + "string", + null, com.azure.core.util.Context.NONE); } } @@ -3903,7 +7037,7 @@ import java.util.Map; /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -3941,6 +7075,7 @@ public final class SchedulesCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3960,7 +7095,7 @@ public final class SchedulesCreateOrUpdateSamples { /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. @@ -3979,7 +7114,7 @@ public final class SchedulesDeleteSamples { /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/get.json */ /** * Sample code: Get Schedule. @@ -3998,7 +7133,7 @@ public final class SchedulesGetSamples { /** Samples for Schedules List. */ public final class SchedulesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/list.json */ /** * Sample code: List Schedules. @@ -4017,7 +7152,7 @@ public final class SchedulesListSamples { /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Usage/list.json */ /** * Sample code: List Usages. @@ -4036,7 +7171,7 @@ public final class UsagesListSamples { /** Samples for VirtualMachineSizes List. */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. @@ -4058,7 +7193,7 @@ import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceCon /** Samples for WorkspaceConnections Create. */ public final class WorkspaceConnectionsCreateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -4086,7 +7221,7 @@ public final class WorkspaceConnectionsCreateSamples { /** Samples for WorkspaceConnections Delete. */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. @@ -4108,7 +7243,7 @@ public final class WorkspaceConnectionsDeleteSamples { /** Samples for WorkspaceConnections Get. */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. @@ -4130,7 +7265,7 @@ public final class WorkspaceConnectionsGetSamples { /** Samples for WorkspaceConnections List. */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -4157,7 +7292,7 @@ public final class WorkspaceConnectionsListSamples { /** Samples for WorkspaceFeatures List. */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. @@ -4189,7 +7324,7 @@ import java.util.Map; /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -4245,6 +7380,7 @@ public final class WorkspacesCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4264,7 +7400,7 @@ public final class WorkspacesCreateOrUpdateSamples { /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -4272,7 +7408,7 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to MachineLearningManager. */ public static void deleteWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().delete("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().delete("workspace-1234", "testworkspace", null, com.azure.core.util.Context.NONE); } } ``` @@ -4288,7 +7424,7 @@ import java.util.Map; /** Samples for Workspaces Diagnose. */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -4316,6 +7452,7 @@ public final class WorkspacesDiagnoseSamples { com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4335,7 +7472,7 @@ public final class WorkspacesDiagnoseSamples { /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/get.json */ /** * Sample code: Get Workspace. @@ -4356,7 +7493,7 @@ public final class WorkspacesGetByResourceGroupSamples { /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -4376,7 +7513,7 @@ public final class WorkspacesListSamples { /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -4396,7 +7533,7 @@ public final class WorkspacesListByResourceGroupSamples { /** Samples for Workspaces ListKeys. */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4415,7 +7552,7 @@ public final class WorkspacesListKeysSamples { /** Samples for Workspaces ListNotebookAccessToken. */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. @@ -4436,7 +7573,7 @@ public final class WorkspacesListNotebookAccessTokenSamples { /** Samples for Workspaces ListNotebookKeys. */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -4457,7 +7594,7 @@ public final class WorkspacesListNotebookKeysSamples { /** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. @@ -4480,7 +7617,7 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /** Samples for Workspaces ListStorageAccountKeys. */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. @@ -4501,7 +7638,7 @@ public final class WorkspacesListStorageAccountKeysSamples { /** Samples for Workspaces PrepareNotebook. */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. @@ -4520,7 +7657,7 @@ public final class WorkspacesPrepareNotebookSamples { /** Samples for Workspaces ResyncKeys. */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. @@ -4542,7 +7679,7 @@ import com.azure.resourcemanager.machinelearning.models.Workspace; /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/update.json */ /** * Sample code: Update Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index ab53de65246f6..ab64d49be962c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for Machine Learning Management - This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2022-10. + This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2023-10. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,9 @@ UTF-8 - true + 0 + 0 + true diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java index a212fe3e6c4a3..e4eefcdf575b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java @@ -23,8 +23,8 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningWorkspacesBuilder; +import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningServices; +import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningServicesBuilder; import com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsImpl; import com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; @@ -37,7 +37,14 @@ import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; import com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturesImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.JobsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsImpl; @@ -46,6 +53,18 @@ import com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.machinelearning.implementation.QuotasImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistriesImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersImpl; +import com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.SchedulesImpl; import com.azure.resourcemanager.machinelearning.implementation.UsagesImpl; import com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesImpl; @@ -64,7 +83,14 @@ import com.azure.resourcemanager.machinelearning.models.Datastores; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; +import com.azure.resourcemanager.machinelearning.models.Features; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainers; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersions; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainers; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersions; import com.azure.resourcemanager.machinelearning.models.Jobs; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; import com.azure.resourcemanager.machinelearning.models.ModelContainers; import com.azure.resourcemanager.machinelearning.models.ModelVersions; import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; @@ -73,6 +99,18 @@ import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; import com.azure.resourcemanager.machinelearning.models.Quotas; +import com.azure.resourcemanager.machinelearning.models.Registries; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryDataContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryDataReferences; +import com.azure.resourcemanager.machinelearning.models.RegistryDataVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; +import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; +import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; import com.azure.resourcemanager.machinelearning.models.Schedules; import com.azure.resourcemanager.machinelearning.models.Usages; import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizes; @@ -109,6 +147,32 @@ public final class MachineLearningManager { private WorkspaceConnections workspaceConnections; + private ManagedNetworkSettingsRules managedNetworkSettingsRules; + + private ManagedNetworkProvisions managedNetworkProvisions; + + private RegistryCodeContainers registryCodeContainers; + + private RegistryCodeVersions registryCodeVersions; + + private RegistryComponentContainers registryComponentContainers; + + private RegistryComponentVersions registryComponentVersions; + + private RegistryDataContainers registryDataContainers; + + private RegistryDataVersions registryDataVersions; + + private RegistryDataReferences registryDataReferences; + + private RegistryEnvironmentContainers registryEnvironmentContainers; + + private RegistryEnvironmentVersions registryEnvironmentVersions; + + private RegistryModelContainers registryModelContainers; + + private RegistryModelVersions registryModelVersions; + private BatchEndpoints batchEndpoints; private BatchDeployments batchDeployments; @@ -131,6 +195,16 @@ public final class MachineLearningManager { private EnvironmentVersions environmentVersions; + private FeaturesetContainers featuresetContainers; + + private Features features; + + private FeaturesetVersions featuresetVersions; + + private FeaturestoreEntityContainers featurestoreEntityContainers; + + private FeaturestoreEntityVersions featurestoreEntityVersions; + private Jobs jobs; private ModelContainers modelContainers; @@ -143,15 +217,17 @@ public final class MachineLearningManager { private Schedules schedules; + private Registries registries; + private WorkspaceFeatures workspaceFeatures; - private final AzureMachineLearningWorkspaces clientObject; + private final AzureMachineLearningServices clientObject; private MachineLearningManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = - new AzureMachineLearningWorkspacesBuilder() + new AzureMachineLearningServicesBuilder() .pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) @@ -310,7 +386,7 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf .append("-") .append("com.azure.resourcemanager.machinelearning") .append("/") - .append("1.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -477,6 +553,172 @@ public WorkspaceConnections workspaceConnections() { return workspaceConnections; } + /** + * Gets the resource collection API of ManagedNetworkSettingsRules. It manages OutboundRuleBasicResource. + * + * @return Resource collection API of ManagedNetworkSettingsRules. + */ + public ManagedNetworkSettingsRules managedNetworkSettingsRules() { + if (this.managedNetworkSettingsRules == null) { + this.managedNetworkSettingsRules = + new ManagedNetworkSettingsRulesImpl(clientObject.getManagedNetworkSettingsRules(), this); + } + return managedNetworkSettingsRules; + } + + /** + * Gets the resource collection API of ManagedNetworkProvisions. + * + * @return Resource collection API of ManagedNetworkProvisions. + */ + public ManagedNetworkProvisions managedNetworkProvisions() { + if (this.managedNetworkProvisions == null) { + this.managedNetworkProvisions = + new ManagedNetworkProvisionsImpl(clientObject.getManagedNetworkProvisions(), this); + } + return managedNetworkProvisions; + } + + /** + * Gets the resource collection API of RegistryCodeContainers. It manages CodeContainer. + * + * @return Resource collection API of RegistryCodeContainers. + */ + public RegistryCodeContainers registryCodeContainers() { + if (this.registryCodeContainers == null) { + this.registryCodeContainers = + new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); + } + return registryCodeContainers; + } + + /** + * Gets the resource collection API of RegistryCodeVersions. It manages CodeVersion. + * + * @return Resource collection API of RegistryCodeVersions. + */ + public RegistryCodeVersions registryCodeVersions() { + if (this.registryCodeVersions == null) { + this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); + } + return registryCodeVersions; + } + + /** + * Gets the resource collection API of RegistryComponentContainers. It manages ComponentContainer. + * + * @return Resource collection API of RegistryComponentContainers. + */ + public RegistryComponentContainers registryComponentContainers() { + if (this.registryComponentContainers == null) { + this.registryComponentContainers = + new RegistryComponentContainersImpl(clientObject.getRegistryComponentContainers(), this); + } + return registryComponentContainers; + } + + /** + * Gets the resource collection API of RegistryComponentVersions. It manages ComponentVersion. + * + * @return Resource collection API of RegistryComponentVersions. + */ + public RegistryComponentVersions registryComponentVersions() { + if (this.registryComponentVersions == null) { + this.registryComponentVersions = + new RegistryComponentVersionsImpl(clientObject.getRegistryComponentVersions(), this); + } + return registryComponentVersions; + } + + /** + * Gets the resource collection API of RegistryDataContainers. It manages DataContainer. + * + * @return Resource collection API of RegistryDataContainers. + */ + public RegistryDataContainers registryDataContainers() { + if (this.registryDataContainers == null) { + this.registryDataContainers = + new RegistryDataContainersImpl(clientObject.getRegistryDataContainers(), this); + } + return registryDataContainers; + } + + /** + * Gets the resource collection API of RegistryDataVersions. It manages DataVersionBase. + * + * @return Resource collection API of RegistryDataVersions. + */ + public RegistryDataVersions registryDataVersions() { + if (this.registryDataVersions == null) { + this.registryDataVersions = new RegistryDataVersionsImpl(clientObject.getRegistryDataVersions(), this); + } + return registryDataVersions; + } + + /** + * Gets the resource collection API of RegistryDataReferences. + * + * @return Resource collection API of RegistryDataReferences. + */ + public RegistryDataReferences registryDataReferences() { + if (this.registryDataReferences == null) { + this.registryDataReferences = + new RegistryDataReferencesImpl(clientObject.getRegistryDataReferences(), this); + } + return registryDataReferences; + } + + /** + * Gets the resource collection API of RegistryEnvironmentContainers. It manages EnvironmentContainer. + * + * @return Resource collection API of RegistryEnvironmentContainers. + */ + public RegistryEnvironmentContainers registryEnvironmentContainers() { + if (this.registryEnvironmentContainers == null) { + this.registryEnvironmentContainers = + new RegistryEnvironmentContainersImpl(clientObject.getRegistryEnvironmentContainers(), this); + } + return registryEnvironmentContainers; + } + + /** + * Gets the resource collection API of RegistryEnvironmentVersions. It manages EnvironmentVersion. + * + * @return Resource collection API of RegistryEnvironmentVersions. + */ + public RegistryEnvironmentVersions registryEnvironmentVersions() { + if (this.registryEnvironmentVersions == null) { + this.registryEnvironmentVersions = + new RegistryEnvironmentVersionsImpl(clientObject.getRegistryEnvironmentVersions(), this); + } + return registryEnvironmentVersions; + } + + /** + * Gets the resource collection API of RegistryModelContainers. It manages ModelContainer. + * + * @return Resource collection API of RegistryModelContainers. + */ + public RegistryModelContainers registryModelContainers() { + if (this.registryModelContainers == null) { + this.registryModelContainers = + new RegistryModelContainersImpl(clientObject.getRegistryModelContainers(), this); + } + return registryModelContainers; + } + + /** + * Gets the resource collection API of RegistryModelVersions. It manages ModelVersion. + * + * @return Resource collection API of RegistryModelVersions. + */ + public RegistryModelVersions registryModelVersions() { + if (this.registryModelVersions == null) { + this.registryModelVersions = new RegistryModelVersionsImpl(clientObject.getRegistryModelVersions(), this); + } + return registryModelVersions; + } + /** * Gets the resource collection API of BatchEndpoints. It manages BatchEndpoint. * @@ -502,7 +744,7 @@ public BatchDeployments batchDeployments() { } /** - * Gets the resource collection API of CodeContainers. It manages CodeContainer. + * Gets the resource collection API of CodeContainers. * * @return Resource collection API of CodeContainers. */ @@ -514,7 +756,7 @@ public CodeContainers codeContainers() { } /** - * Gets the resource collection API of CodeVersions. It manages CodeVersion. + * Gets the resource collection API of CodeVersions. * * @return Resource collection API of CodeVersions. */ @@ -526,7 +768,7 @@ public CodeVersions codeVersions() { } /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. + * Gets the resource collection API of ComponentContainers. * * @return Resource collection API of ComponentContainers. */ @@ -538,7 +780,7 @@ public ComponentContainers componentContainers() { } /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. + * Gets the resource collection API of ComponentVersions. * * @return Resource collection API of ComponentVersions. */ @@ -550,7 +792,7 @@ public ComponentVersions componentVersions() { } /** - * Gets the resource collection API of DataContainers. It manages DataContainer. + * Gets the resource collection API of DataContainers. * * @return Resource collection API of DataContainers. */ @@ -562,7 +804,7 @@ public DataContainers dataContainers() { } /** - * Gets the resource collection API of DataVersions. It manages DataVersionBase. + * Gets the resource collection API of DataVersions. * * @return Resource collection API of DataVersions. */ @@ -586,7 +828,7 @@ public Datastores datastores() { } /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. + * Gets the resource collection API of EnvironmentContainers. * * @return Resource collection API of EnvironmentContainers. */ @@ -598,7 +840,7 @@ public EnvironmentContainers environmentContainers() { } /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. + * Gets the resource collection API of EnvironmentVersions. * * @return Resource collection API of EnvironmentVersions. */ @@ -609,6 +851,68 @@ public EnvironmentVersions environmentVersions() { return environmentVersions; } + /** + * Gets the resource collection API of FeaturesetContainers. It manages FeaturesetContainer. + * + * @return Resource collection API of FeaturesetContainers. + */ + public FeaturesetContainers featuresetContainers() { + if (this.featuresetContainers == null) { + this.featuresetContainers = new FeaturesetContainersImpl(clientObject.getFeaturesetContainers(), this); + } + return featuresetContainers; + } + + /** + * Gets the resource collection API of Features. + * + * @return Resource collection API of Features. + */ + public Features features() { + if (this.features == null) { + this.features = new FeaturesImpl(clientObject.getFeatures(), this); + } + return features; + } + + /** + * Gets the resource collection API of FeaturesetVersions. It manages FeaturesetVersion. + * + * @return Resource collection API of FeaturesetVersions. + */ + public FeaturesetVersions featuresetVersions() { + if (this.featuresetVersions == null) { + this.featuresetVersions = new FeaturesetVersionsImpl(clientObject.getFeaturesetVersions(), this); + } + return featuresetVersions; + } + + /** + * Gets the resource collection API of FeaturestoreEntityContainers. It manages FeaturestoreEntityContainer. + * + * @return Resource collection API of FeaturestoreEntityContainers. + */ + public FeaturestoreEntityContainers featurestoreEntityContainers() { + if (this.featurestoreEntityContainers == null) { + this.featurestoreEntityContainers = + new FeaturestoreEntityContainersImpl(clientObject.getFeaturestoreEntityContainers(), this); + } + return featurestoreEntityContainers; + } + + /** + * Gets the resource collection API of FeaturestoreEntityVersions. It manages FeaturestoreEntityVersion. + * + * @return Resource collection API of FeaturestoreEntityVersions. + */ + public FeaturestoreEntityVersions featurestoreEntityVersions() { + if (this.featurestoreEntityVersions == null) { + this.featurestoreEntityVersions = + new FeaturestoreEntityVersionsImpl(clientObject.getFeaturestoreEntityVersions(), this); + } + return featurestoreEntityVersions; + } + /** * Gets the resource collection API of Jobs. It manages JobBase. * @@ -622,7 +926,7 @@ public Jobs jobs() { } /** - * Gets the resource collection API of ModelContainers. It manages ModelContainer. + * Gets the resource collection API of ModelContainers. * * @return Resource collection API of ModelContainers. */ @@ -634,7 +938,7 @@ public ModelContainers modelContainers() { } /** - * Gets the resource collection API of ModelVersions. It manages ModelVersion. + * Gets the resource collection API of ModelVersions. * * @return Resource collection API of ModelVersions. */ @@ -681,6 +985,18 @@ public Schedules schedules() { return schedules; } + /** + * Gets the resource collection API of Registries. It manages Registry. + * + * @return Resource collection API of Registries. + */ + public Registries registries() { + if (this.registries == null) { + this.registries = new RegistriesImpl(clientObject.getRegistries(), this); + } + return registries; + } + /** * Gets the resource collection API of WorkspaceFeatures. * @@ -694,10 +1010,12 @@ public WorkspaceFeatures workspaceFeatures() { } /** - * @return Wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client AzureMachineLearningServices providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client AzureMachineLearningServices. */ - public AzureMachineLearningWorkspaces serviceClient() { + public AzureMachineLearningServices serviceClient() { return this.clientObject; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java similarity index 58% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java index e8a40ef9b43c9..ff64ff69d09b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java @@ -7,8 +7,8 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AzureMachineLearningWorkspaces class. */ -public interface AzureMachineLearningWorkspaces { +/** The interface for AzureMachineLearningServices class. */ +public interface AzureMachineLearningServices { /** * Gets The ID of the target subscription. * @@ -107,6 +107,97 @@ public interface AzureMachineLearningWorkspaces { */ WorkspaceConnectionsClient getWorkspaceConnections(); + /** + * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * + * @return the ManagedNetworkSettingsRulesClient object. + */ + ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); + + /** + * Gets the ManagedNetworkProvisionsClient object to access its operations. + * + * @return the ManagedNetworkProvisionsClient object. + */ + ManagedNetworkProvisionsClient getManagedNetworkProvisions(); + + /** + * Gets the RegistryCodeContainersClient object to access its operations. + * + * @return the RegistryCodeContainersClient object. + */ + RegistryCodeContainersClient getRegistryCodeContainers(); + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + RegistryCodeVersionsClient getRegistryCodeVersions(); + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + RegistryComponentContainersClient getRegistryComponentContainers(); + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + RegistryComponentVersionsClient getRegistryComponentVersions(); + + /** + * Gets the RegistryDataContainersClient object to access its operations. + * + * @return the RegistryDataContainersClient object. + */ + RegistryDataContainersClient getRegistryDataContainers(); + + /** + * Gets the RegistryDataVersionsClient object to access its operations. + * + * @return the RegistryDataVersionsClient object. + */ + RegistryDataVersionsClient getRegistryDataVersions(); + + /** + * Gets the RegistryDataReferencesClient object to access its operations. + * + * @return the RegistryDataReferencesClient object. + */ + RegistryDataReferencesClient getRegistryDataReferences(); + + /** + * Gets the RegistryEnvironmentContainersClient object to access its operations. + * + * @return the RegistryEnvironmentContainersClient object. + */ + RegistryEnvironmentContainersClient getRegistryEnvironmentContainers(); + + /** + * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * + * @return the RegistryEnvironmentVersionsClient object. + */ + RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions(); + + /** + * Gets the RegistryModelContainersClient object to access its operations. + * + * @return the RegistryModelContainersClient object. + */ + RegistryModelContainersClient getRegistryModelContainers(); + + /** + * Gets the RegistryModelVersionsClient object to access its operations. + * + * @return the RegistryModelVersionsClient object. + */ + RegistryModelVersionsClient getRegistryModelVersions(); + /** * Gets the BatchEndpointsClient object to access its operations. * @@ -184,6 +275,41 @@ public interface AzureMachineLearningWorkspaces { */ EnvironmentVersionsClient getEnvironmentVersions(); + /** + * Gets the FeaturesetContainersClient object to access its operations. + * + * @return the FeaturesetContainersClient object. + */ + FeaturesetContainersClient getFeaturesetContainers(); + + /** + * Gets the FeaturesClient object to access its operations. + * + * @return the FeaturesClient object. + */ + FeaturesClient getFeatures(); + + /** + * Gets the FeaturesetVersionsClient object to access its operations. + * + * @return the FeaturesetVersionsClient object. + */ + FeaturesetVersionsClient getFeaturesetVersions(); + + /** + * Gets the FeaturestoreEntityContainersClient object to access its operations. + * + * @return the FeaturestoreEntityContainersClient object. + */ + FeaturestoreEntityContainersClient getFeaturestoreEntityContainers(); + + /** + * Gets the FeaturestoreEntityVersionsClient object to access its operations. + * + * @return the FeaturestoreEntityVersionsClient object. + */ + FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions(); + /** * Gets the JobsClient object to access its operations. * @@ -226,6 +352,13 @@ public interface AzureMachineLearningWorkspaces { */ SchedulesClient getSchedules(); + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + RegistriesClient getRegistries(); + /** * Gets the WorkspaceFeaturesClient object to access its operations. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java index fa5b5e3a44693..72b8b87a54c73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java @@ -8,8 +8,13 @@ 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.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; /** An instance of this class provides access to all the operations defined in CodeVersionsClient. */ public interface CodeVersionsClient { @@ -36,6 +41,8 @@ public interface CodeVersionsClient { * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,6 +57,8 @@ PagedIterable list( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context); /** @@ -154,4 +163,121 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) CodeVersionInner createOrUpdate( String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java index c1374059eaa05..e4b9307550906 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java @@ -8,8 +8,11 @@ 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.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ComponentVersionsClient. */ @@ -157,4 +160,81 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) ComponentVersionInner createOrUpdate( String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java index bf43827ba11f0..775bfbd1d3cd0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java @@ -8,8 +8,11 @@ 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.machinelearning.fluent.models.DataVersionBaseInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in DataVersionsClient. */ @@ -161,4 +164,81 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) DataVersionBaseInner createOrUpdate( String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java index 9b6667f2237ec..f3421878d8ee8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java @@ -8,8 +8,11 @@ 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.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. */ @@ -157,4 +160,81 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) EnvironmentVersionInner createOrUpdate( String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java new file mode 100644 index 0000000000000..d270e75fe0acb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeatureInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in FeaturesClient. */ +public interface FeaturesClient { + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion); + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + Context context); + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName, + Context context); + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeatureInner get( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java new file mode 100644 index 0000000000000..7a1756fad503c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeaturesetContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in FeaturesetContainersClient. */ +public interface FeaturesetContainersClient { + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java new file mode 100644 index 0000000000000..5ebd69cc3d8b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in FeaturesetVersionsClient. */ +public interface FeaturesetVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetVersionBackfillResponseInner> + beginBackfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturesetVersionBackfillResponseInner> + beginBackfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionBackfillResponseInner backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionBackfillResponseInner backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java new file mode 100644 index 0000000000000..17f5cbe9d1925 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeaturestoreEntityContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in FeaturestoreEntityContainersClient. */ +public interface FeaturestoreEntityContainersClient { + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityContainerInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java new file mode 100644 index 0000000000000..c9309a685edad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in FeaturestoreEntityVersionsClient. */ +public interface FeaturestoreEntityVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 workspaceName, String name, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java index c4660d91fa818..06c83aa0e8f01 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java @@ -38,6 +38,8 @@ public interface JobsClient { * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,6 +54,7 @@ PagedIterable list( String jobType, String tag, ListViewType listViewType, + String properties, Context context); /** @@ -141,7 +144,8 @@ SyncPoller, Void> beginDelete( JobBaseInner get(String resourceGroupName, String workspaceName, String id); /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -158,7 +162,8 @@ Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context); /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java new file mode 100644 index 0000000000000..8950519245948 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.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.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; + +/** An instance of this class provides access to all the operations defined in ManagedNetworkProvisionsClient. */ +public interface ManagedNetworkProvisionsClient { + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetwork(String resourceGroupName, String workspaceName); + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context); + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName); + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkProvisionStatusInner provisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java new file mode 100644 index 0000000000000..737dae45384b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.OutboundRuleBasicResourceInner; + +/** An instance of this class provides access to all the operations defined in ManagedNetworkSettingsRulesClient. */ +public interface ManagedNetworkSettingsRulesClient { + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String ruleName, Context context); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleName); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleName, Context context); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName); + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body); + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context); + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body); + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java index 92582d819da13..15888b4b841f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java @@ -8,8 +8,11 @@ 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.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; /** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ @@ -169,4 +172,81 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) ModelVersionInner createOrUpdate( String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java index 8b04958fc924d..392113c0f5231 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java @@ -403,7 +403,7 @@ void regenerateKeys( Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -419,7 +419,7 @@ Response getTokenWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java index cf8b8217b3035..098e904b422b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java @@ -8,7 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { @@ -17,11 +17,11 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.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 array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. @@ -30,9 +30,9 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java new file mode 100644 index 0000000000000..e3f2ab26fe5a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; + +/** An instance of this class provides access to all the operations defined in RegistriesClient. */ +public interface RegistriesClient { + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context); + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner update(String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body); + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, RegistryInner> beginRemoveRegions( + String resourceGroupName, String registryName, RegistryInner body); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, RegistryInner> beginRemoveRegions( + String resourceGroupName, String registryName, RegistryInner body, Context context); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java new file mode 100644 index 0000000000000..11209d86d6d59 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeContainerInner; + +/** An instance of this class provides access to all the operations defined in RegistryCodeContainersClient. */ +public interface RegistryCodeContainersClient { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String codeName); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String codeName, Context context); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, Context context); + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner get(String resourceGroupName, String registryName, String codeName); + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body); + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context); + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body); + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java new file mode 100644 index 0000000000000..e918e624ffce1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; + +/** An instance of this class provides access to all the operations defined in RegistryCodeVersionsClient. */ +public interface RegistryCodeVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String codeName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String codeName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String codeName, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java new file mode 100644 index 0000000000000..11f8512d8b1a5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComponentContainerInner; + +/** An instance of this class provides access to all the operations defined in RegistryComponentContainersClient. */ +public interface RegistryComponentContainersClient { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String componentName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java new file mode 100644 index 0000000000000..69acd80c67489 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ComponentVersionInner; + +/** An instance of this class provides access to all the operations defined in RegistryComponentVersionsClient. */ +public interface RegistryComponentVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String componentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String componentName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java new file mode 100644 index 0000000000000..c787ec9c7013b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryDataContainersClient. */ +public interface RegistryDataContainersClient { + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String name, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerInner get(String resourceGroupName, String registryName, String name); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerInner createOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerInner createOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java new file mode 100644 index 0000000000000..126e54ea92779 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; + +/** An instance of this class provides access to all the operations defined in RegistryDataReferencesClient. */ +public interface RegistryDataReferencesClient { + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBlobReferenceSasWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body, + Context context); + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GetBlobReferenceSasResponseDtoInner getBlobReferenceSas( + String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java new file mode 100644 index 0000000000000..f3dfe9b18c81b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DataVersionBaseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; + +/** An instance of this class provides access to all the operations defined in RegistryDataVersionsClient. */ +public interface RegistryDataVersionsClient { + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String name); + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String name, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionBaseInner createOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionBaseInner createOrUpdate( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java new file mode 100644 index 0000000000000..ed8169506312a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentContainersClient. */ +public interface RegistryEnvironmentContainersClient { + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String environmentName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java new file mode 100644 index 0000000000000..5cd6aaf2d4741 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.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.machinelearning.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.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryEnvironmentVersionsClient. */ +public interface RegistryEnvironmentVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String environmentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String environmentName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java new file mode 100644 index 0000000000000..72f4660742975 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** An instance of this class provides access to all the operations defined in RegistryModelContainersClient. */ +public interface RegistryModelContainersClient { + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String modelName, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner get(String resourceGroupName, String registryName, String modelName); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body); + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java new file mode 100644 index 0000000000000..c328c5a98d687 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; + +/** An instance of this class provides access to all the operations defined in RegistryModelVersionsClient. */ +public interface RegistryModelVersionsClient { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String modelName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 registryName, String modelName, String version, Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body); + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String modelName, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java index 2057cda2ab5a4..9c31067c30012 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java @@ -131,6 +131,7 @@ WorkspaceInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -138,7 +139,8 @@ WorkspaceInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); + SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); /** * Deletes a machine learning workspace. @@ -157,13 +159,14 @@ WorkspaceInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); + void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); /** * Updates a machine learning workspace with the specified parameters. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java deleted file mode 100644 index a21e00f4df18e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java +++ /dev/null @@ -1,106 +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.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Machine Learning workspace REST API operation. */ -@Fluent -public final class AmlOperationInner { - /* - * Operation name: {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of operation - */ - @JsonProperty(value = "display") - private AmlOperationDisplay display; - - /* - * Indicates whether the operation applies to data-plane - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /** Creates an instance of AmlOperationInner class. */ - public AmlOperationInner() { - } - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: Display name of operation. - * - * @return the display value. - */ - public AmlOperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display name of operation. - * - * @param display the display value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withDisplay(AmlOperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @param isDataAction the isDataAction value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java new file mode 100644 index 0000000000000..e4d4b0bf9ad06 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.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.machinelearning.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.machinelearning.models.FeatureProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class FeatureInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private FeatureProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FeatureInner class. */ + public FeatureInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public FeatureProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the FeatureInner object itself. + */ + public FeatureInner withProperties(FeatureProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model FeatureInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeatureInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java new file mode 100644 index 0000000000000..c5b1b9bce0c73 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.FeaturesetContainerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class FeaturesetContainerInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private FeaturesetContainerProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FeaturesetContainerInner class. */ + public FeaturesetContainerInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public FeaturesetContainerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the FeaturesetContainerInner object itself. + */ + public FeaturesetContainerInner withProperties(FeaturesetContainerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model FeaturesetContainerInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeaturesetContainerInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java new file mode 100644 index 0000000000000..f31b5de2a86af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Response payload for creating a backfill request for a given feature set version. */ +@Fluent +public final class FeaturesetVersionBackfillResponseInner { + /* + * List of jobs submitted as part of the backfill request. + */ + @JsonProperty(value = "jobIds") + private List jobIds; + + /** Creates an instance of FeaturesetVersionBackfillResponseInner class. */ + public FeaturesetVersionBackfillResponseInner() { + } + + /** + * Get the jobIds property: List of jobs submitted as part of the backfill request. + * + * @return the jobIds value. + */ + public List jobIds() { + return this.jobIds; + } + + /** + * Set the jobIds property: List of jobs submitted as part of the backfill request. + * + * @param jobIds the jobIds value to set. + * @return the FeaturesetVersionBackfillResponseInner object itself. + */ + public FeaturesetVersionBackfillResponseInner withJobIds(List jobIds) { + this.jobIds = jobIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java new file mode 100644 index 0000000000000..53d1791f92133 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.FeaturesetVersionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class FeaturesetVersionInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private FeaturesetVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FeaturesetVersionInner class. */ + public FeaturesetVersionInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public FeaturesetVersionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the FeaturesetVersionInner object itself. + */ + public FeaturesetVersionInner withProperties(FeaturesetVersionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model FeaturesetVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeaturesetVersionInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java new file mode 100644 index 0000000000000..56f7e4881e7db --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.FeaturestoreEntityContainerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class FeaturestoreEntityContainerInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private FeaturestoreEntityContainerProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FeaturestoreEntityContainerInner class. */ + public FeaturestoreEntityContainerInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public FeaturestoreEntityContainerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the FeaturestoreEntityContainerInner object itself. + */ + public FeaturestoreEntityContainerInner withProperties(FeaturestoreEntityContainerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model FeaturestoreEntityContainerInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityContainerInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java new file mode 100644 index 0000000000000..58277a053be0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.FeaturestoreEntityVersionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class FeaturestoreEntityVersionInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private FeaturestoreEntityVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of FeaturestoreEntityVersionInner class. */ + public FeaturestoreEntityVersionInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public FeaturestoreEntityVersionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the FeaturestoreEntityVersionInner object itself. + */ + public FeaturestoreEntityVersionInner withProperties(FeaturestoreEntityVersionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model FeaturestoreEntityVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityVersionInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java new file mode 100644 index 0000000000000..3d2cc4a56b543 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** BlobReferenceSASResponse for getBlobReferenceSAS API. */ +@Fluent +public final class GetBlobReferenceSasResponseDtoInner { + /* + * Blob reference for consumption details + */ + @JsonProperty(value = "blobReferenceForConsumption") + private GetBlobReferenceForConsumptionDto blobReferenceForConsumption; + + /** Creates an instance of GetBlobReferenceSasResponseDtoInner class. */ + public GetBlobReferenceSasResponseDtoInner() { + } + + /** + * Get the blobReferenceForConsumption property: Blob reference for consumption details. + * + * @return the blobReferenceForConsumption value. + */ + public GetBlobReferenceForConsumptionDto blobReferenceForConsumption() { + return this.blobReferenceForConsumption; + } + + /** + * Set the blobReferenceForConsumption property: Blob reference for consumption details. + * + * @param blobReferenceForConsumption the blobReferenceForConsumption value to set. + * @return the GetBlobReferenceSasResponseDtoInner object itself. + */ + public GetBlobReferenceSasResponseDtoInner withBlobReferenceForConsumption( + GetBlobReferenceForConsumptionDto blobReferenceForConsumption) { + this.blobReferenceForConsumption = blobReferenceForConsumption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (blobReferenceForConsumption() != null) { + blobReferenceForConsumption().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java new file mode 100644 index 0000000000000..e2cc21faca0c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Status of the Provisioning for the managed network of a machine learning workspace. */ +@Fluent +public final class ManagedNetworkProvisionStatusInner { + /* + * The sparkReady property. + */ + @JsonProperty(value = "sparkReady") + private Boolean sparkReady; + + /* + * Status for the managed network of a machine learning workspace. + */ + @JsonProperty(value = "status") + private ManagedNetworkStatus status; + + /** Creates an instance of ManagedNetworkProvisionStatusInner class. */ + public ManagedNetworkProvisionStatusInner() { + } + + /** + * Get the sparkReady property: The sparkReady property. + * + * @return the sparkReady value. + */ + public Boolean sparkReady() { + return this.sparkReady; + } + + /** + * Set the sparkReady property: The sparkReady property. + * + * @param sparkReady the sparkReady value to set. + * @return the ManagedNetworkProvisionStatusInner object itself. + */ + public ManagedNetworkProvisionStatusInner withSparkReady(Boolean sparkReady) { + this.sparkReady = sparkReady; + return this; + } + + /** + * Get the status property: Status for the managed network of a machine learning workspace. + * + * @return the status value. + */ + public ManagedNetworkStatus status() { + return this.status; + } + + /** + * Set the status property: Status for the managed network of a machine learning workspace. + * + * @param status the status value to set. + * @return the ManagedNetworkProvisionStatusInner object itself. + */ + public ManagedNetworkProvisionStatusInner withStatus(ManagedNetworkStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java new file mode 100644 index 0000000000000..9ccd596426156 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed Network settings for a machine learning workspace. */ +@Fluent +public final class ManagedNetworkSettingsInner { + /* + * Isolation mode for the managed network of a machine learning workspace. + */ + @JsonProperty(value = "isolationMode") + private IsolationMode isolationMode; + + /* + * The networkId property. + */ + @JsonProperty(value = "networkId", access = JsonProperty.Access.WRITE_ONLY) + private String networkId; + + /* + * Dictionary of + */ + @JsonProperty(value = "outboundRules") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map outboundRules; + + /* + * Status of the Provisioning for the managed network of a machine learning workspace. + */ + @JsonProperty(value = "status") + private ManagedNetworkProvisionStatusInner status; + + /** Creates an instance of ManagedNetworkSettingsInner class. */ + public ManagedNetworkSettingsInner() { + } + + /** + * Get the isolationMode property: Isolation mode for the managed network of a machine learning workspace. + * + * @return the isolationMode value. + */ + public IsolationMode isolationMode() { + return this.isolationMode; + } + + /** + * Set the isolationMode property: Isolation mode for the managed network of a machine learning workspace. + * + * @param isolationMode the isolationMode value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withIsolationMode(IsolationMode isolationMode) { + this.isolationMode = isolationMode; + return this; + } + + /** + * Get the networkId property: The networkId property. + * + * @return the networkId value. + */ + public String networkId() { + return this.networkId; + } + + /** + * Get the outboundRules property: Dictionary of <OutboundRule>. + * + * @return the outboundRules value. + */ + public Map outboundRules() { + return this.outboundRules; + } + + /** + * Set the outboundRules property: Dictionary of <OutboundRule>. + * + * @param outboundRules the outboundRules value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withOutboundRules(Map outboundRules) { + this.outboundRules = outboundRules; + return this; + } + + /** + * Get the status property: Status of the Provisioning for the managed network of a machine learning workspace. + * + * @return the status value. + */ + public ManagedNetworkProvisionStatusInner status() { + return this.status; + } + + /** + * Set the status property: Status of the Provisioning for the managed network of a machine learning workspace. + * + * @param status the status value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withStatus(ManagedNetworkProvisionStatusInner status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (outboundRules() != null) { + outboundRules() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (status() != null) { + status().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java new file mode 100644 index 0000000000000..2b9d3cc0365e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.ActionType; +import com.azure.resourcemanager.machinelearning.models.OperationDisplay; +import com.azure.resourcemanager.machinelearning.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java new file mode 100644 index 0000000000000..3e779e74b239c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.OutboundRule; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Outbound Rule Basic Resource for the managed network of a machine learning workspace. */ +@Fluent +public final class OutboundRuleBasicResourceInner extends ProxyResource { + /* + * Outbound Rule for the managed network of a machine learning workspace. + */ + @JsonProperty(value = "properties", required = true) + private OutboundRule properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of OutboundRuleBasicResourceInner class. */ + public OutboundRuleBasicResourceInner() { + } + + /** + * Get the properties property: Outbound Rule for the managed network of a machine learning workspace. + * + * @return the properties value. + */ + public OutboundRule properties() { + return this.properties; + } + + /** + * Set the properties property: Outbound Rule for the managed network of a machine learning workspace. + * + * @param properties the properties value to set. + * @return the OutboundRuleBasicResourceInner object itself. + */ + public OutboundRuleBasicResourceInner withProperties(OutboundRule properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model OutboundRuleBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OutboundRuleBasicResourceInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java new file mode 100644 index 0000000000000..55a0e08858ba2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PendingUploadResponseDto model. */ +@Fluent +public final class PendingUploadResponseDtoInner { + /* + * Container level read, write, list SAS + */ + @JsonProperty(value = "blobReferenceForConsumption") + private BlobReferenceForConsumptionDto blobReferenceForConsumption; + + /* + * ID for this upload request + */ + @JsonProperty(value = "pendingUploadId") + private String pendingUploadId; + + /* + * TemporaryBlobReference is the only supported type + */ + @JsonProperty(value = "pendingUploadType") + private PendingUploadType pendingUploadType; + + /** Creates an instance of PendingUploadResponseDtoInner class. */ + public PendingUploadResponseDtoInner() { + } + + /** + * Get the blobReferenceForConsumption property: Container level read, write, list SAS. + * + * @return the blobReferenceForConsumption value. + */ + public BlobReferenceForConsumptionDto blobReferenceForConsumption() { + return this.blobReferenceForConsumption; + } + + /** + * Set the blobReferenceForConsumption property: Container level read, write, list SAS. + * + * @param blobReferenceForConsumption the blobReferenceForConsumption value to set. + * @return the PendingUploadResponseDtoInner object itself. + */ + public PendingUploadResponseDtoInner withBlobReferenceForConsumption( + BlobReferenceForConsumptionDto blobReferenceForConsumption) { + this.blobReferenceForConsumption = blobReferenceForConsumption; + return this; + } + + /** + * Get the pendingUploadId property: ID for this upload request. + * + * @return the pendingUploadId value. + */ + public String pendingUploadId() { + return this.pendingUploadId; + } + + /** + * Set the pendingUploadId property: ID for this upload request. + * + * @param pendingUploadId the pendingUploadId value to set. + * @return the PendingUploadResponseDtoInner object itself. + */ + public PendingUploadResponseDtoInner withPendingUploadId(String pendingUploadId) { + this.pendingUploadId = pendingUploadId; + return this; + } + + /** + * Get the pendingUploadType property: TemporaryBlobReference is the only supported type. + * + * @return the pendingUploadType value. + */ + public PendingUploadType pendingUploadType() { + return this.pendingUploadType; + } + + /** + * Set the pendingUploadType property: TemporaryBlobReference is the only supported type. + * + * @param pendingUploadType the pendingUploadType value to set. + * @return the PendingUploadResponseDtoInner object itself. + */ + public PendingUploadResponseDtoInner withPendingUploadType(PendingUploadType pendingUploadType) { + this.pendingUploadType = pendingUploadType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (blobReferenceForConsumption() != null) { + blobReferenceForConsumption().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java new file mode 100644 index 0000000000000..0f0c65ac906d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The Registry model. */ +@Fluent +public final class RegistryInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private RegistryProperties innerProperties = new RegistryProperties(); + + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of RegistryInner class. */ + public RegistryInner() { + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @param kind the kind value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the innerProperties property: [Required] Additional attributes of the entity. + * + * @return the innerProperties value. + */ + private RegistryProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public RegistryInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the discoveryUrl property: Discovery URL for the Registry. + * + * @return the discoveryUrl value. + */ + public String discoveryUrl() { + return this.innerProperties() == null ? null : this.innerProperties().discoveryUrl(); + } + + /** + * Set the discoveryUrl property: Discovery URL for the Registry. + * + * @param discoveryUrl the discoveryUrl value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withDiscoveryUrl(String discoveryUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withDiscoveryUrl(discoveryUrl); + return this; + } + + /** + * Get the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @return the intellectualPropertyPublisher value. + */ + public String intellectualPropertyPublisher() { + return this.innerProperties() == null ? null : this.innerProperties().intellectualPropertyPublisher(); + } + + /** + * Set the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @param intellectualPropertyPublisher the intellectualPropertyPublisher value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withIntellectualPropertyPublisher(intellectualPropertyPublisher); + return this; + } + + /** + * Get the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. + * + * @return the managedResourceGroup value. + */ + public ArmResourceId managedResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroup(); + } + + /** + * Set the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. + * + * @param managedResourceGroup the managedResourceGroup value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withManagedResourceGroup(ArmResourceId managedResourceGroup) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withManagedResourceGroup(managedResourceGroup); + return this; + } + + /** + * Get the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @return the mlFlowRegistryUri value. + */ + public String mlFlowRegistryUri() { + return this.innerProperties() == null ? null : this.innerProperties().mlFlowRegistryUri(); + } + + /** + * Set the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @param mlFlowRegistryUri the mlFlowRegistryUri value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withMlFlowRegistryUri(String mlFlowRegistryUri) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withMlFlowRegistryUri(mlFlowRegistryUri); + return this; + } + + /** + * Get the registryPrivateEndpointConnections property: Private endpoint connections info used for pending + * connections in private link portal. + * + * @return the registryPrivateEndpointConnections value. + */ + public List registryPrivateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().registryPrivateEndpointConnections(); + } + + /** + * Set the registryPrivateEndpointConnections property: Private endpoint connections info used for pending + * connections in private link portal. + * + * @param registryPrivateEndpointConnections the registryPrivateEndpointConnections value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withRegistryPrivateEndpointConnections( + List registryPrivateEndpointConnections) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withRegistryPrivateEndpointConnections(registryPrivateEndpointConnections); + return this; + } + + /** + * Get the publicNetworkAccess property: Is the Registry accessible from the internet? Possible values: "Enabled" or + * "Disabled". + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Is the Registry accessible from the internet? Possible values: "Enabled" or + * "Disabled". + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withPublicNetworkAccess(String publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the regionDetails property: Details of each region the registry is in. + * + * @return the regionDetails value. + */ + public List regionDetails() { + return this.innerProperties() == null ? null : this.innerProperties().regionDetails(); + } + + /** + * Set the regionDetails property: Details of each region the registry is in. + * + * @param regionDetails the regionDetails value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withRegionDetails(List regionDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withRegionDetails(regionDetails); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model RegistryInner")); + } else { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RegistryInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java new file mode 100644 index 0000000000000..20b118c719685 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of the Private Endpoint Connection. */ +@Fluent +public final class RegistryPrivateEndpointConnectionProperties { + /* + * The group ids + */ + @JsonProperty(value = "groupIds") + private List groupIds; + + /* + * The PE network resource that is linked to this PE connection. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpointResource privateEndpoint; + + /* + * The connection state. + */ + @JsonProperty(value = "registryPrivateLinkServiceConnectionState") + private RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState; + + /* + * One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. + */ + @JsonProperty(value = "provisioningState") + private String provisioningState; + + /** Creates an instance of RegistryPrivateEndpointConnectionProperties class. */ + public RegistryPrivateEndpointConnectionProperties() { + } + + /** + * Get the groupIds property: The group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Set the groupIds property: The group ids. + * + * @param groupIds the groupIds value to set. + * @return the RegistryPrivateEndpointConnectionProperties object itself. + */ + public RegistryPrivateEndpointConnectionProperties withGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * Get the privateEndpoint property: The PE network resource that is linked to this PE connection. + * + * @return the privateEndpoint value. + */ + public PrivateEndpointResource privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The PE network resource that is linked to this PE connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RegistryPrivateEndpointConnectionProperties object itself. + */ + public RegistryPrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointResource privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the registryPrivateLinkServiceConnectionState property: The connection state. + * + * @return the registryPrivateLinkServiceConnectionState value. + */ + public RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState() { + return this.registryPrivateLinkServiceConnectionState; + } + + /** + * Set the registryPrivateLinkServiceConnectionState property: The connection state. + * + * @param registryPrivateLinkServiceConnectionState the registryPrivateLinkServiceConnectionState value to set. + * @return the RegistryPrivateEndpointConnectionProperties object itself. + */ + public RegistryPrivateEndpointConnectionProperties withRegistryPrivateLinkServiceConnectionState( + RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState) { + this.registryPrivateLinkServiceConnectionState = registryPrivateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's + * null. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's + * null. + * + * @param provisioningState the provisioningState value to set. + * @return the RegistryPrivateEndpointConnectionProperties object itself. + */ + public RegistryPrivateEndpointConnectionProperties withProvisioningState(String provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (registryPrivateLinkServiceConnectionState() != null) { + registryPrivateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java new file mode 100644 index 0000000000000..a8ae4826d3214 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Details of the Registry. */ +@Fluent +public final class RegistryProperties { + /* + * Discovery URL for the Registry + */ + @JsonProperty(value = "discoveryUrl") + private String discoveryUrl; + + /* + * IntellectualPropertyPublisher for the registry + */ + @JsonProperty(value = "intellectualPropertyPublisher") + private String intellectualPropertyPublisher; + + /* + * ResourceId of the managed RG if the registry has system created resources + */ + @JsonProperty(value = "managedResourceGroup") + private ArmResourceId managedResourceGroup; + + /* + * MLFlow Registry URI for the Registry + */ + @JsonProperty(value = "mlFlowRegistryUri") + private String mlFlowRegistryUri; + + /* + * Private endpoint connections info used for pending connections in private link portal + */ + @JsonProperty(value = "registryPrivateEndpointConnections") + private List registryPrivateEndpointConnections; + + /* + * Is the Registry accessible from the internet? + * Possible values: "Enabled" or "Disabled" + */ + @JsonProperty(value = "publicNetworkAccess") + private String publicNetworkAccess; + + /* + * Details of each region the registry is in + */ + @JsonProperty(value = "regionDetails") + private List regionDetails; + + /** Creates an instance of RegistryProperties class. */ + public RegistryProperties() { + } + + /** + * Get the discoveryUrl property: Discovery URL for the Registry. + * + * @return the discoveryUrl value. + */ + public String discoveryUrl() { + return this.discoveryUrl; + } + + /** + * Set the discoveryUrl property: Discovery URL for the Registry. + * + * @param discoveryUrl the discoveryUrl value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withDiscoveryUrl(String discoveryUrl) { + this.discoveryUrl = discoveryUrl; + return this; + } + + /** + * Get the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @return the intellectualPropertyPublisher value. + */ + public String intellectualPropertyPublisher() { + return this.intellectualPropertyPublisher; + } + + /** + * Set the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @param intellectualPropertyPublisher the intellectualPropertyPublisher value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { + this.intellectualPropertyPublisher = intellectualPropertyPublisher; + return this; + } + + /** + * Get the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. + * + * @return the managedResourceGroup value. + */ + public ArmResourceId managedResourceGroup() { + return this.managedResourceGroup; + } + + /** + * Set the managedResourceGroup property: ResourceId of the managed RG if the registry has system created resources. + * + * @param managedResourceGroup the managedResourceGroup value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withManagedResourceGroup(ArmResourceId managedResourceGroup) { + this.managedResourceGroup = managedResourceGroup; + return this; + } + + /** + * Get the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @return the mlFlowRegistryUri value. + */ + public String mlFlowRegistryUri() { + return this.mlFlowRegistryUri; + } + + /** + * Set the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @param mlFlowRegistryUri the mlFlowRegistryUri value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withMlFlowRegistryUri(String mlFlowRegistryUri) { + this.mlFlowRegistryUri = mlFlowRegistryUri; + return this; + } + + /** + * Get the registryPrivateEndpointConnections property: Private endpoint connections info used for pending + * connections in private link portal. + * + * @return the registryPrivateEndpointConnections value. + */ + public List registryPrivateEndpointConnections() { + return this.registryPrivateEndpointConnections; + } + + /** + * Set the registryPrivateEndpointConnections property: Private endpoint connections info used for pending + * connections in private link portal. + * + * @param registryPrivateEndpointConnections the registryPrivateEndpointConnections value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withRegistryPrivateEndpointConnections( + List registryPrivateEndpointConnections) { + this.registryPrivateEndpointConnections = registryPrivateEndpointConnections; + return this; + } + + /** + * Get the publicNetworkAccess property: Is the Registry accessible from the internet? Possible values: "Enabled" or + * "Disabled". + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Is the Registry accessible from the internet? Possible values: "Enabled" or + * "Disabled". + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withPublicNetworkAccess(String publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the regionDetails property: Details of each region the registry is in. + * + * @return the regionDetails value. + */ + public List regionDetails() { + return this.regionDetails; + } + + /** + * Set the regionDetails property: Details of each region the registry is in. + * + * @param regionDetails the regionDetails value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties withRegionDetails(List regionDetails) { + this.regionDetails = regionDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedResourceGroup() != null) { + managedResourceGroup().validate(); + } + if (registryPrivateEndpointConnections() != null) { + registryPrivateEndpointConnections().forEach(e -> e.validate()); + } + if (regionDetails() != null) { + regionDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java index 0574f791c1fea..a5b0effd3486e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.Sku; @@ -494,6 +495,29 @@ public List privateEndpointConnections() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } + /** + * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + /** * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * @@ -629,6 +653,29 @@ public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { return this; } + /** + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsInner managedNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + } + + /** + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @param managedNetwork the managedNetwork value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withManagedNetwork(managedNetwork); + return this; + } + /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java index 147434b8ed519..14657217030de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java @@ -8,6 +8,7 @@ import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.fasterxml.jackson.annotation.JsonProperty; @@ -122,6 +123,12 @@ public final class WorkspacePropertiesInner { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; + /* + * Settings for serverless compute created in the workspace + */ + @JsonProperty(value = "serverlessComputeSettings") + private ServerlessComputeSettings serverlessComputeSettings; + /* * The list of shared private link resources in this workspace. */ @@ -170,6 +177,12 @@ public final class WorkspacePropertiesInner { @JsonProperty(value = "v1LegacyMode") private Boolean v1LegacyMode; + /* + * Managed Network settings for a machine learning workspace. + */ + @JsonProperty(value = "managedNetwork") + private ManagedNetworkSettingsInner managedNetwork; + /** Creates an instance of WorkspacePropertiesInner class. */ public WorkspacePropertiesInner() { } @@ -471,6 +484,26 @@ public List privateEndpointConnections() { return this.privateEndpointConnections; } + /** + * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; + return this; + } + /** * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * @@ -595,6 +628,26 @@ public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { return this; } + /** + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsInner managedNetwork() { + return this.managedNetwork; + } + + /** + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @param managedNetwork the managedNetwork value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.managedNetwork = managedNetwork; + return this; + } + /** * Validates the instance. * @@ -607,6 +660,9 @@ public void validate() { if (privateEndpointConnections() != null) { privateEndpointConnections().forEach(e -> e.validate()); } + if (serverlessComputeSettings() != null) { + serverlessComputeSettings().validate(); + } if (sharedPrivateLinkResources() != null) { sharedPrivateLinkResources().forEach(e -> e.validate()); } @@ -616,5 +672,8 @@ public void validate() { if (serviceManagedResourcesSettings() != null) { serviceManagedResourcesSettings().validate(); } + if (managedNetwork() != null) { + managedNetwork().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java index ecf35a74ba330..8f40f761b333b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.fasterxml.jackson.annotation.JsonProperty; @@ -42,6 +43,12 @@ public final class WorkspacePropertiesUpdateParameters { @JsonProperty(value = "primaryUserAssignedIdentity") private String primaryUserAssignedIdentity; + /* + * Settings for serverless compute created in the workspace + */ + @JsonProperty(value = "serverlessComputeSettings") + private ServerlessComputeSettings serverlessComputeSettings; + /* * Whether requests from Public Network are allowed. */ @@ -167,6 +174,27 @@ public WorkspacePropertiesUpdateParameters withPrimaryUserAssignedIdentity(Strin return this; } + /** + * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspacePropertiesUpdateParameters object itself. + */ + public WorkspacePropertiesUpdateParameters withServerlessComputeSettings( + ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; + return this; + } + /** * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. * @@ -236,5 +264,8 @@ public void validate() { if (serviceManagedResourcesSettings() != null) { serviceManagedResourcesSettings().validate(); } + if (serverlessComputeSettings() != null) { + serverlessComputeSettings().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java index 3e822d30cd968..c4a20504c94a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the inner data models for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java index f5bef46229750..50522669a1fc8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the service clients for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java deleted file mode 100644 index 803be140a597c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java +++ /dev/null @@ -1,42 +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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; - -public final class AmlOperationImpl implements AmlOperation { - private AmlOperationInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - AmlOperationImpl( - AmlOperationInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public AmlOperationDisplay display() { - return this.innerModel().display(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public AmlOperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesBuilder.java similarity index 71% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesBuilder.java index 018c1d288b6ac..ebc8a73bcc2d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesBuilder.java @@ -14,9 +14,9 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureMachineLearningWorkspacesImpl.class}) -public final class AzureMachineLearningWorkspacesBuilder { +/** A builder for creating a new instance of the AzureMachineLearningServicesImpl type. */ +@ServiceClientBuilder(serviceClients = {AzureMachineLearningServicesImpl.class}) +public final class AzureMachineLearningServicesBuilder { /* * The ID of the target subscription. */ @@ -26,9 +26,9 @@ public final class AzureMachineLearningWorkspacesBuilder { * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { + public AzureMachineLearningServicesBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -42,9 +42,9 @@ public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionI * Sets server parameter. * * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { + public AzureMachineLearningServicesBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -58,9 +58,9 @@ public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment environment) { + public AzureMachineLearningServicesBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -74,9 +74,9 @@ public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment enviro * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { + public AzureMachineLearningServicesBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -90,9 +90,9 @@ public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaultPollInterval) { + public AzureMachineLearningServicesBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -106,19 +106,19 @@ public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaul * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the AzureMachineLearningServicesBuilder. */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AzureMachineLearningServicesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. + * Builds an instance of AzureMachineLearningServicesImpl with the provided parameters. * - * @return an instance of AzureMachineLearningWorkspacesImpl. + * @return an instance of AzureMachineLearningServicesImpl. */ - public AzureMachineLearningWorkspacesImpl buildClient() { + public AzureMachineLearningServicesImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = @@ -131,13 +131,13 @@ public AzureMachineLearningWorkspacesImpl buildClient() { (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureMachineLearningWorkspacesImpl client = - new AzureMachineLearningWorkspacesImpl( + AzureMachineLearningServicesImpl client = + new AzureMachineLearningServicesImpl( localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java similarity index 66% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java index 242efe7553fdd..ffd79ac34d597 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java @@ -22,7 +22,7 @@ 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.machinelearning.fluent.AzureMachineLearningWorkspaces; +import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningServices; import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; @@ -35,7 +35,14 @@ import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.FeaturesClient; +import com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.JobsClient; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; @@ -44,6 +51,18 @@ import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; @@ -59,9 +78,9 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClient(builder = AzureMachineLearningWorkspacesBuilder.class) -public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { +/** Initializes a new instance of the AzureMachineLearningServicesImpl type. */ +@ServiceClient(builder = AzureMachineLearningServicesBuilder.class) +public final class AzureMachineLearningServicesImpl implements AzureMachineLearningServices { /** The ID of the target subscription. */ private final String subscriptionId; @@ -242,6 +261,162 @@ public WorkspaceConnectionsClient getWorkspaceConnections() { return this.workspaceConnections; } + /** The ManagedNetworkSettingsRulesClient object to access its operations. */ + private final ManagedNetworkSettingsRulesClient managedNetworkSettingsRules; + + /** + * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * + * @return the ManagedNetworkSettingsRulesClient object. + */ + public ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules() { + return this.managedNetworkSettingsRules; + } + + /** The ManagedNetworkProvisionsClient object to access its operations. */ + private final ManagedNetworkProvisionsClient managedNetworkProvisions; + + /** + * Gets the ManagedNetworkProvisionsClient object to access its operations. + * + * @return the ManagedNetworkProvisionsClient object. + */ + public ManagedNetworkProvisionsClient getManagedNetworkProvisions() { + return this.managedNetworkProvisions; + } + + /** The RegistryCodeContainersClient object to access its operations. */ + private final RegistryCodeContainersClient registryCodeContainers; + + /** + * Gets the RegistryCodeContainersClient object to access its operations. + * + * @return the RegistryCodeContainersClient object. + */ + public RegistryCodeContainersClient getRegistryCodeContainers() { + return this.registryCodeContainers; + } + + /** The RegistryCodeVersionsClient object to access its operations. */ + private final RegistryCodeVersionsClient registryCodeVersions; + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + public RegistryCodeVersionsClient getRegistryCodeVersions() { + return this.registryCodeVersions; + } + + /** The RegistryComponentContainersClient object to access its operations. */ + private final RegistryComponentContainersClient registryComponentContainers; + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + public RegistryComponentContainersClient getRegistryComponentContainers() { + return this.registryComponentContainers; + } + + /** The RegistryComponentVersionsClient object to access its operations. */ + private final RegistryComponentVersionsClient registryComponentVersions; + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + public RegistryComponentVersionsClient getRegistryComponentVersions() { + return this.registryComponentVersions; + } + + /** The RegistryDataContainersClient object to access its operations. */ + private final RegistryDataContainersClient registryDataContainers; + + /** + * Gets the RegistryDataContainersClient object to access its operations. + * + * @return the RegistryDataContainersClient object. + */ + public RegistryDataContainersClient getRegistryDataContainers() { + return this.registryDataContainers; + } + + /** The RegistryDataVersionsClient object to access its operations. */ + private final RegistryDataVersionsClient registryDataVersions; + + /** + * Gets the RegistryDataVersionsClient object to access its operations. + * + * @return the RegistryDataVersionsClient object. + */ + public RegistryDataVersionsClient getRegistryDataVersions() { + return this.registryDataVersions; + } + + /** The RegistryDataReferencesClient object to access its operations. */ + private final RegistryDataReferencesClient registryDataReferences; + + /** + * Gets the RegistryDataReferencesClient object to access its operations. + * + * @return the RegistryDataReferencesClient object. + */ + public RegistryDataReferencesClient getRegistryDataReferences() { + return this.registryDataReferences; + } + + /** The RegistryEnvironmentContainersClient object to access its operations. */ + private final RegistryEnvironmentContainersClient registryEnvironmentContainers; + + /** + * Gets the RegistryEnvironmentContainersClient object to access its operations. + * + * @return the RegistryEnvironmentContainersClient object. + */ + public RegistryEnvironmentContainersClient getRegistryEnvironmentContainers() { + return this.registryEnvironmentContainers; + } + + /** The RegistryEnvironmentVersionsClient object to access its operations. */ + private final RegistryEnvironmentVersionsClient registryEnvironmentVersions; + + /** + * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * + * @return the RegistryEnvironmentVersionsClient object. + */ + public RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions() { + return this.registryEnvironmentVersions; + } + + /** The RegistryModelContainersClient object to access its operations. */ + private final RegistryModelContainersClient registryModelContainers; + + /** + * Gets the RegistryModelContainersClient object to access its operations. + * + * @return the RegistryModelContainersClient object. + */ + public RegistryModelContainersClient getRegistryModelContainers() { + return this.registryModelContainers; + } + + /** The RegistryModelVersionsClient object to access its operations. */ + private final RegistryModelVersionsClient registryModelVersions; + + /** + * Gets the RegistryModelVersionsClient object to access its operations. + * + * @return the RegistryModelVersionsClient object. + */ + public RegistryModelVersionsClient getRegistryModelVersions() { + return this.registryModelVersions; + } + /** The BatchEndpointsClient object to access its operations. */ private final BatchEndpointsClient batchEndpoints; @@ -374,6 +549,66 @@ public EnvironmentVersionsClient getEnvironmentVersions() { return this.environmentVersions; } + /** The FeaturesetContainersClient object to access its operations. */ + private final FeaturesetContainersClient featuresetContainers; + + /** + * Gets the FeaturesetContainersClient object to access its operations. + * + * @return the FeaturesetContainersClient object. + */ + public FeaturesetContainersClient getFeaturesetContainers() { + return this.featuresetContainers; + } + + /** The FeaturesClient object to access its operations. */ + private final FeaturesClient features; + + /** + * Gets the FeaturesClient object to access its operations. + * + * @return the FeaturesClient object. + */ + public FeaturesClient getFeatures() { + return this.features; + } + + /** The FeaturesetVersionsClient object to access its operations. */ + private final FeaturesetVersionsClient featuresetVersions; + + /** + * Gets the FeaturesetVersionsClient object to access its operations. + * + * @return the FeaturesetVersionsClient object. + */ + public FeaturesetVersionsClient getFeaturesetVersions() { + return this.featuresetVersions; + } + + /** The FeaturestoreEntityContainersClient object to access its operations. */ + private final FeaturestoreEntityContainersClient featurestoreEntityContainers; + + /** + * Gets the FeaturestoreEntityContainersClient object to access its operations. + * + * @return the FeaturestoreEntityContainersClient object. + */ + public FeaturestoreEntityContainersClient getFeaturestoreEntityContainers() { + return this.featurestoreEntityContainers; + } + + /** The FeaturestoreEntityVersionsClient object to access its operations. */ + private final FeaturestoreEntityVersionsClient featurestoreEntityVersions; + + /** + * Gets the FeaturestoreEntityVersionsClient object to access its operations. + * + * @return the FeaturestoreEntityVersionsClient object. + */ + public FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions() { + return this.featurestoreEntityVersions; + } + /** The JobsClient object to access its operations. */ private final JobsClient jobs; @@ -446,6 +681,18 @@ public SchedulesClient getSchedules() { return this.schedules; } + /** The RegistriesClient object to access its operations. */ + private final RegistriesClient registries; + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + public RegistriesClient getRegistries() { + return this.registries; + } + /** The WorkspaceFeaturesClient object to access its operations. */ private final WorkspaceFeaturesClient workspaceFeatures; @@ -459,7 +706,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { } /** - * Initializes an instance of AzureMachineLearningWorkspaces client. + * Initializes an instance of AzureMachineLearningServices client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -468,7 +715,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - AzureMachineLearningWorkspacesImpl( + AzureMachineLearningServicesImpl( HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, @@ -480,7 +727,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-10-01"; + this.apiVersion = "2023-10-01"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -490,6 +737,19 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); + this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); + this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); + this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); + this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); + this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); + this.registryComponentVersions = new RegistryComponentVersionsClientImpl(this); + this.registryDataContainers = new RegistryDataContainersClientImpl(this); + this.registryDataVersions = new RegistryDataVersionsClientImpl(this); + this.registryDataReferences = new RegistryDataReferencesClientImpl(this); + this.registryEnvironmentContainers = new RegistryEnvironmentContainersClientImpl(this); + this.registryEnvironmentVersions = new RegistryEnvironmentVersionsClientImpl(this); + this.registryModelContainers = new RegistryModelContainersClientImpl(this); + this.registryModelVersions = new RegistryModelVersionsClientImpl(this); this.batchEndpoints = new BatchEndpointsClientImpl(this); this.batchDeployments = new BatchDeploymentsClientImpl(this); this.codeContainers = new CodeContainersClientImpl(this); @@ -501,12 +761,18 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.datastores = new DatastoresClientImpl(this); this.environmentContainers = new EnvironmentContainersClientImpl(this); this.environmentVersions = new EnvironmentVersionsClientImpl(this); + this.featuresetContainers = new FeaturesetContainersClientImpl(this); + this.features = new FeaturesClientImpl(this); + this.featuresetVersions = new FeaturesetVersionsClientImpl(this); + this.featurestoreEntityContainers = new FeaturestoreEntityContainersClientImpl(this); + this.featurestoreEntityVersions = new FeaturestoreEntityVersionsClientImpl(this); this.jobs = new JobsClientImpl(this); this.modelContainers = new ModelContainersClientImpl(this); this.modelVersions = new ModelVersionsClientImpl(this); this.onlineEndpoints = new OnlineEndpointsClientImpl(this); this.onlineDeployments = new OnlineDeploymentsClientImpl(this); this.schedules = new SchedulesClientImpl(this); + this.registries = new RegistriesClientImpl(this); this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); } @@ -650,5 +916,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningServicesImpl.class); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java index 6f28d675f5f5a..ce019da00bf54 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java @@ -46,31 +46,29 @@ public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient private final BatchDeploymentsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchDeploymentsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchDeployments to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesBatchDeployments to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface BatchDeploymentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -88,9 +86,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -106,9 +102,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -124,9 +118,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -143,9 +135,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java index 9d00fdc12171a..a26aec5b8be69 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java @@ -48,21 +48,21 @@ public final class BatchEndpointsClientImpl implements BatchEndpointsClient { private final BatchEndpointsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchEndpointsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchEndpoints to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesBatchEndpoints to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -70,8 +70,7 @@ public final class BatchEndpointsClientImpl implements BatchEndpointsClient { public interface BatchEndpointsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -87,8 +86,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -103,8 +101,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -119,8 +116,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -136,8 +132,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -153,9 +148,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/listkeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java index f739c63622acd..eae9e1a14652c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java @@ -49,13 +49,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String codeName; - public CodeContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public CodeContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } @@ -63,9 +63,8 @@ public CodeContainer create() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), Context.NONE); return this; } @@ -73,16 +72,15 @@ public CodeContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), context); return this; } CodeContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new CodeContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.codeName = name; } public CodeContainerImpl update() { @@ -93,9 +91,8 @@ public CodeContainer apply() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), Context.NONE); return this; } @@ -103,9 +100,8 @@ public CodeContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryCodeContainers() + .createOrUpdate(resourceGroupName, registryName, codeName, this.innerModel(), context); return this; } @@ -115,16 +111,16 @@ public CodeContainer apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = Utils.getValueFromIdByName(innerObject.id(), "codes"); } public CodeContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryCodeContainers() + .getWithResponse(resourceGroupName, registryName, codeName, Context.NONE) .getValue(); return this; } @@ -133,8 +129,8 @@ public CodeContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryCodeContainers() + .getWithResponse(resourceGroupName, registryName, codeName, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java index 019f7490ddf83..22a21bcd33831 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java @@ -39,21 +39,21 @@ public final class CodeContainersClientImpl implements CodeContainersClient { private final CodeContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesCodeContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -61,8 +61,7 @@ public final class CodeContainersClientImpl implements CodeContainersClient { public interface CodeContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -77,8 +76,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -93,8 +91,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -109,8 +106,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java index 0202b27fb32c4..c82929e2dc868 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java @@ -73,108 +73,29 @@ public CodeContainer get(String resourceGroupName, String workspaceName, String } } - public CodeContainer 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + public CodeContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { + CodeContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private CodeContainersClient serviceClient() { @@ -184,8 +105,4 @@ private CodeContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public CodeContainerImpl define(String name) { - return new CodeContainerImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java index daab7505f3ff6..20ee2762624c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java @@ -4,11 +4,14 @@ package com.azure.resourcemanager.machinelearning.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.models.CodeVersion; import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; public final class CodeVersionImpl implements CodeVersion, CodeVersion.Definition, CodeVersion.Update { private CodeVersionInner innerObject; @@ -49,16 +52,16 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String codeName; private String version; - public CodeVersionImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { + public CodeVersionImpl withExistingCode(String resourceGroupName, String registryName, String codeName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.codeName = codeName; return this; } @@ -66,10 +69,8 @@ public CodeVersion create() { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), Context.NONE); return this; } @@ -77,9 +78,8 @@ public CodeVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), context); return this; } @@ -97,10 +97,8 @@ public CodeVersion apply() { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), Context.NONE); return this; } @@ -108,9 +106,8 @@ public CodeVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryCodeVersions() + .createOrUpdate(resourceGroupName, registryName, codeName, version, this.innerModel(), context); return this; } @@ -119,8 +116,8 @@ public CodeVersion apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = Utils.getValueFromIdByName(innerObject.id(), "codes"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } @@ -128,8 +125,8 @@ public CodeVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryCodeVersions() + .getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE) .getValue(); return this; } @@ -138,12 +135,26 @@ public CodeVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryCodeVersions() + .getWithResponse(resourceGroupName, registryName, codeName, version, context) .getValue(); return this; } + public Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context) { + return serviceManager + .registryCodeVersions() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, codeName, version, body, context); + } + + public PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body) { + return serviceManager + .registryCodeVersions() + .createOrGetStartPendingUpload(resourceGroupName, registryName, codeName, version, body); + } + public CodeVersionImpl withProperties(CodeVersionProperties properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java index 5e0cdc080acdd..38effa417a60f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -26,11 +27,19 @@ 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.machinelearning.fluent.CodeVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +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 CodeVersionsClient. */ @@ -39,21 +48,21 @@ public final class CodeVersionsClientImpl implements CodeVersionsClient { private final CodeVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(CodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesCodeVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -61,8 +70,7 @@ public final class CodeVersionsClientImpl implements CodeVersionsClient { public interface CodeVersionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -75,13 +83,14 @@ Mono> list( @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("hash") String hash, + @QueryParam("hashVersion") String hashVersion, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -97,8 +106,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -114,8 +122,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -130,6 +137,40 @@ Mono> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DestinationAsset body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PendingUploadRequestDto body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -150,6 +191,8 @@ Mono> listNext( * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -158,7 +201,14 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String name, String orderBy, Integer top, String skip) { + String resourceGroupName, + String workspaceName, + String name, + String orderBy, + Integer top, + String skip, + String hash, + String hashVersion) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -196,6 +246,8 @@ private Mono> listSinglePageAsync( orderBy, top, skip, + hash, + hashVersion, accept, context)) .>map( @@ -219,6 +271,8 @@ private Mono> listSinglePageAsync( * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -234,6 +288,8 @@ private Mono> listSinglePageAsync( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -270,6 +326,8 @@ private Mono> listSinglePageAsync( orderBy, top, skip, + hash, + hashVersion, accept, context) .map( @@ -292,6 +350,8 @@ private Mono> listSinglePageAsync( * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -299,9 +359,16 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String name, String orderBy, Integer top, String skip) { + String resourceGroupName, + String workspaceName, + String name, + String orderBy, + Integer top, + String skip, + String hash, + String hashVersion) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -321,8 +388,10 @@ private PagedFlux listAsync(String resourceGroupName, String w final String orderBy = null; final Integer top = null; final String skip = null; + final String hash = null; + final String hashVersion = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -335,6 +404,8 @@ private PagedFlux listAsync(String resourceGroupName, String w * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -349,9 +420,13 @@ private PagedFlux listAsync( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, context), + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -371,7 +446,10 @@ public PagedIterable list(String resourceGroupName, String wor final String orderBy = null; final Integer top = null; final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip)); + final String hash = null; + final String hashVersion = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion)); } /** @@ -383,6 +461,8 @@ public PagedIterable list(String resourceGroupName, String wor * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -397,8 +477,11 @@ public PagedIterable list( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, context)); + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context)); } /** @@ -937,6 +1020,528 @@ public CodeVersionInner createOrUpdate( .getValue(); } + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + PendingUploadRequestDto body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrGetStartPendingUploadAsync( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + PendingUploadRequestDto body, + Context context) { + return createOrGetStartPendingUploadWithResponseAsync( + resourceGroupName, workspaceName, name, version, body, context) + .block(); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponse( + resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java index 49705d0a8abd7..30a658003cce6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java @@ -11,8 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; import com.azure.resourcemanager.machinelearning.models.CodeVersion; import com.azure.resourcemanager.machinelearning.models.CodeVersions; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; public final class CodeVersionsImpl implements CodeVersions { private static final ClientLogger LOGGER = new ClientLogger(CodeVersionsImpl.class); @@ -40,9 +44,13 @@ public PagedIterable list( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name, orderBy, top, skip, context); + this + .serviceClient() + .list(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context); return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } @@ -79,136 +87,86 @@ public CodeVersion get(String resourceGroupName, String workspaceName, String na } } - public CodeVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public CodeVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { + CodeVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + public void publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "codes"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + public void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); + } + + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + PendingUploadRequestDto body, + Context context) { + Response inner = + this + .serviceClient() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); + } else { + return null; } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + + public PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { + PendingUploadResponseDtoInner inner = + this.serviceClient().createOrGetStartPendingUpload(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new PendingUploadResponseDtoImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } private CodeVersionsClient serviceClient() { @@ -218,8 +176,4 @@ private CodeVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public CodeVersionImpl define(String name) { - return new CodeVersionImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java index 0208215c0403c..98f219f5889ea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java @@ -50,13 +50,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String componentName; - public ComponentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ComponentContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } @@ -64,9 +64,8 @@ public ComponentContainer create() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } @@ -74,9 +73,8 @@ public ComponentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), context); return this; } @@ -84,7 +82,7 @@ public ComponentContainer create(Context context) { String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new ComponentContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.componentName = name; } public ComponentContainerImpl update() { @@ -95,9 +93,8 @@ public ComponentContainer apply() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } @@ -105,9 +102,8 @@ public ComponentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), context); return this; } @@ -117,16 +113,16 @@ public ComponentContainer apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = Utils.getValueFromIdByName(innerObject.id(), "components"); } public ComponentContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryComponentContainers() + .getWithResponse(resourceGroupName, registryName, componentName, Context.NONE) .getValue(); return this; } @@ -135,8 +131,8 @@ public ComponentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryComponentContainers() + .getWithResponse(resourceGroupName, registryName, componentName, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java index 7c8593db5a972..85ef9aed402ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java @@ -40,21 +40,21 @@ public final class ComponentContainersClientImpl implements ComponentContainersC private final ComponentContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentContainers to be used by the + * The interface defining all the services for AzureMachineLearningServicesComponentContainers to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -62,8 +62,7 @@ public final class ComponentContainersClientImpl implements ComponentContainersC public interface ComponentContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -95,8 +93,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -111,8 +108,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java index b9bc5f40a732d..308ac7fc8c0b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java @@ -74,108 +74,30 @@ public ComponentContainer get(String resourceGroupName, String workspaceName, St } } - public ComponentContainer 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + public ComponentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { + ComponentContainerInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private ComponentContainersClient serviceClient() { @@ -185,8 +107,4 @@ private ComponentContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ComponentContainerImpl define(String name) { - return new ComponentContainerImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java index 2b90ee811ddbd..8cda2a3d7a029 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java @@ -50,16 +50,17 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String componentName; private String version; - public ComponentVersionImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { + public ComponentVersionImpl withExistingComponent( + String resourceGroupName, String registryName, String componentName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.componentName = componentName; return this; } @@ -67,10 +68,9 @@ public ComponentVersion create() { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate( + resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } @@ -78,9 +78,8 @@ public ComponentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), context); return this; } @@ -98,10 +97,9 @@ public ComponentVersion apply() { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate( + resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } @@ -109,9 +107,8 @@ public ComponentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), context); return this; } @@ -121,8 +118,8 @@ public ComponentVersion apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = Utils.getValueFromIdByName(innerObject.id(), "components"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } @@ -130,8 +127,8 @@ public ComponentVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryComponentVersions() + .getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE) .getValue(); return this; } @@ -140,8 +137,8 @@ public ComponentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryComponentVersions() + .getWithResponse(resourceGroupName, registryName, componentName, version, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java index 4cfb98d8af644..530b899cf2c0e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -26,12 +27,18 @@ 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.machinelearning.fluent.ComponentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 ComponentVersionsClient. */ @@ -40,30 +47,29 @@ public final class ComponentVersionsClientImpl implements ComponentVersionsClien private final ComponentVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentVersions to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesComponentVersions to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface ComponentVersionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -82,8 +88,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -99,8 +104,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -116,8 +120,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -132,6 +135,23 @@ Mono> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DestinationAsset body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -965,6 +985,327 @@ public ComponentVersionInner createOrUpdate( .getValue(); } + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java index b31d3e83102bb..2478104706c4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; import com.azure.resourcemanager.machinelearning.models.ComponentVersions; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; public final class ComponentVersionsImpl implements ComponentVersions { @@ -83,136 +84,52 @@ public ComponentVersion get(String resourceGroupName, String workspaceName, Stri } } - public ComponentVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public ComponentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { + ComponentVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + public void publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "components"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + public void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); } private ComponentVersionsClient serviceClient() { @@ -222,8 +139,4 @@ private ComponentVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ComponentVersionImpl define(String name) { - return new ComponentVersionImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java index 1502a033768b6..22f51788a2a7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java @@ -51,29 +51,28 @@ public final class ComputesClientImpl implements ComputesClient { private final ComputesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComputesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComputesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesComputes to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface ComputesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -88,8 +87,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -104,8 +102,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -121,8 +118,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -138,8 +134,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -155,8 +150,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNodes( @@ -171,8 +165,7 @@ Mono> listNodes( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys( @@ -187,8 +180,7 @@ Mono> listKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> start( @@ -203,8 +195,7 @@ Mono>> start( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stop( @@ -219,8 +210,7 @@ Mono>> stop( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") @ExpectedResponses({202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> restart( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java index 226bd04ddbb2d..27f16726e21f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java @@ -49,13 +49,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; private String name; - public DataContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public DataContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } @@ -63,9 +63,8 @@ public DataContainer create() { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryDataContainers() + .createOrUpdate(resourceGroupName, registryName, name, this.innerModel(), Context.NONE); return this; } @@ -73,9 +72,8 @@ public DataContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryDataContainers() + .createOrUpdate(resourceGroupName, registryName, name, this.innerModel(), context); return this; } @@ -93,9 +91,8 @@ public DataContainer apply() { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryDataContainers() + .createOrUpdate(resourceGroupName, registryName, name, this.innerModel(), Context.NONE); return this; } @@ -103,9 +100,8 @@ public DataContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryDataContainers() + .createOrUpdate(resourceGroupName, registryName, name, this.innerModel(), context); return this; } @@ -115,7 +111,7 @@ public DataContainer apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); } @@ -123,8 +119,8 @@ public DataContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryDataContainers() + .getWithResponse(resourceGroupName, registryName, name, Context.NONE) .getValue(); return this; } @@ -133,8 +129,8 @@ public DataContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryDataContainers() + .getWithResponse(resourceGroupName, registryName, name, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java index ce1b750a11dec..1760b3a4d12c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java @@ -40,21 +40,21 @@ public final class DataContainersClientImpl implements DataContainersClient { private final DataContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDataContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -62,8 +62,7 @@ public final class DataContainersClientImpl implements DataContainersClient { public interface DataContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -95,8 +93,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -111,8 +108,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java index 2bc8ef7ece530..ec7dad9c79b8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java @@ -74,108 +74,29 @@ public DataContainer get(String resourceGroupName, String workspaceName, String } } - public DataContainer 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + public DataContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, DataContainerInner body) { + DataContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new DataContainerImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private DataContainersClient serviceClient() { @@ -185,8 +106,4 @@ private DataContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public DataContainerImpl define(String name) { - return new DataContainerImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java index 00c2cd10b3754..19d81afbc327c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java @@ -4,11 +4,14 @@ package com.azure.resourcemanager.machinelearning.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; public final class DataVersionBaseImpl implements DataVersionBase, DataVersionBase.Definition, DataVersionBase.Update { private DataVersionBaseInner innerObject; @@ -49,15 +52,15 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; private String name; private String version; - public DataVersionBaseImpl withExistingData(String resourceGroupName, String workspaceName, String name) { + public DataVersionBaseImpl withExistingData(String resourceGroupName, String registryName, String name) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; this.name = name; return this; } @@ -66,10 +69,8 @@ public DataVersionBase create() { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryDataVersions() + .createOrUpdate(resourceGroupName, registryName, name, version, this.innerModel(), Context.NONE); return this; } @@ -77,9 +78,8 @@ public DataVersionBase create(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryDataVersions() + .createOrUpdate(resourceGroupName, registryName, name, version, this.innerModel(), context); return this; } @@ -97,10 +97,8 @@ public DataVersionBase apply() { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryDataVersions() + .createOrUpdate(resourceGroupName, registryName, name, version, this.innerModel(), Context.NONE); return this; } @@ -108,9 +106,8 @@ public DataVersionBase apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryDataVersions() + .createOrUpdate(resourceGroupName, registryName, name, version, this.innerModel(), context); return this; } @@ -120,7 +117,7 @@ public DataVersionBase apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } @@ -129,8 +126,8 @@ public DataVersionBase refresh() { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryDataVersions() + .getWithResponse(resourceGroupName, registryName, name, version, Context.NONE) .getValue(); return this; } @@ -139,12 +136,25 @@ public DataVersionBase refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryDataVersions() + .getWithResponse(resourceGroupName, registryName, name, version, context) .getValue(); return this; } + public Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context) { + return serviceManager + .registryDataVersions() + .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, name, version, body, context); + } + + public PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body) { + return serviceManager + .registryDataVersions() + .createOrGetStartPendingUpload(resourceGroupName, registryName, name, version, body); + } + public DataVersionBaseImpl withProperties(DataVersionBaseProperties properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java index 3a6cbe8f79548..d9b923412d521 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -26,12 +27,18 @@ 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.machinelearning.fluent.DataVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 DataVersionsClient. */ @@ -40,21 +47,21 @@ public final class DataVersionsClientImpl implements DataVersionsClient { private final DataVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDataVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -62,8 +69,7 @@ public final class DataVersionsClientImpl implements DataVersionsClient { public interface DataVersionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -83,8 +89,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -100,8 +105,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -117,8 +121,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -133,6 +136,23 @@ Mono> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DestinationAsset body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -992,6 +1012,327 @@ public DataVersionBaseInner createOrUpdate( .getValue(); } + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java index 09fc917310d6b..00af9a56c2870 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; import com.azure.resourcemanager.machinelearning.models.DataVersions; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; public final class DataVersionsImpl implements DataVersions { @@ -84,136 +85,52 @@ public DataVersionBase get(String resourceGroupName, String workspaceName, Strin } } - public DataVersionBase 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataVersionBaseImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public DataVersionBase createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { + DataVersionBaseInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new DataVersionBaseImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + public void publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "data"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + public void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); } private DataVersionsClient serviceClient() { @@ -223,8 +140,4 @@ private DataVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public DataVersionBaseImpl define(String name) { - return new DataVersionBaseImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java index 62f960a4c3aec..d1eeeb4e67a7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java @@ -44,21 +44,21 @@ public final class DatastoresClientImpl implements DatastoresClient { private final DatastoresService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { + DatastoresClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDatastores to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesDatastores to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -66,8 +66,7 @@ public final class DatastoresClientImpl implements DatastoresClient { public interface DatastoresService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -88,8 +87,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -104,8 +102,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -120,8 +117,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -138,8 +134,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSecrets( @@ -215,7 +210,10 @@ private Mono> listSinglePageAsync( String namesConverted = (names == null) ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + : names + .stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -301,7 +299,10 @@ private Mono> listSinglePageAsync( String namesConverted = (names == null) ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + : names + .stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java index 4ee12b6fd24e6..4a002613a7322 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java @@ -50,13 +50,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String environmentName; - public EnvironmentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public EnvironmentContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } @@ -64,9 +64,8 @@ public EnvironmentContainer create() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } @@ -74,9 +73,8 @@ public EnvironmentContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), context); return this; } @@ -84,7 +82,7 @@ public EnvironmentContainer create(Context context) { String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new EnvironmentContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.environmentName = name; } public EnvironmentContainerImpl update() { @@ -95,9 +93,8 @@ public EnvironmentContainer apply() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } @@ -105,9 +102,8 @@ public EnvironmentContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), context); return this; } @@ -117,16 +113,16 @@ public EnvironmentContainer apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "environments"); } public EnvironmentContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryEnvironmentContainers() + .getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE) .getValue(); return this; } @@ -135,8 +131,8 @@ public EnvironmentContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryEnvironmentContainers() + .getWithResponse(resourceGroupName, registryName, environmentName, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java index d569783d4fc89..9eba86fdead7b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java @@ -40,14 +40,14 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain private final EnvironmentContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(EnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -55,7 +55,7 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentContainers to be used by the + * The interface defining all the services for AzureMachineLearningServicesEnvironmentContainers to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -63,8 +63,7 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain public interface EnvironmentContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -80,8 +79,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -96,8 +94,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -112,8 +109,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java index acbe2b72b83e8..b41fa86b685e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java @@ -74,108 +74,30 @@ public EnvironmentContainer get(String resourceGroupName, String workspaceName, } } - public EnvironmentContainer 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + public EnvironmentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { + EnvironmentContainerInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private EnvironmentContainersClient serviceClient() { @@ -185,8 +107,4 @@ private EnvironmentContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public EnvironmentContainerImpl define(String name) { - return new EnvironmentContainerImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java index 653ef01782d9e..87f0ea22c6ca7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java @@ -50,16 +50,17 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String environmentName; private String version; - public EnvironmentVersionImpl withExistingEnvironment(String resourceGroupName, String workspaceName, String name) { + public EnvironmentVersionImpl withExistingEnvironment( + String resourceGroupName, String registryName, String environmentName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.environmentName = environmentName; return this; } @@ -67,10 +68,9 @@ public EnvironmentVersion create() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate( + resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } @@ -78,9 +78,8 @@ public EnvironmentVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), context); return this; } @@ -99,10 +98,9 @@ public EnvironmentVersion apply() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate( + resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } @@ -110,9 +108,8 @@ public EnvironmentVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), context); return this; } @@ -122,8 +119,8 @@ public EnvironmentVersion apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "environments"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } @@ -131,8 +128,8 @@ public EnvironmentVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryEnvironmentVersions() + .getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE) .getValue(); return this; } @@ -141,8 +138,8 @@ public EnvironmentVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryEnvironmentVersions() + .getWithResponse(resourceGroupName, registryName, environmentName, version, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java index 0f6b8a58aa6d2..ab948548fae5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -26,12 +27,18 @@ 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.machinelearning.fluent.EnvironmentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 EnvironmentVersionsClient. */ @@ -40,21 +47,21 @@ public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsC private final EnvironmentVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(EnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentVersions to be used by the + * The interface defining all the services for AzureMachineLearningServicesEnvironmentVersions to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -62,8 +69,7 @@ public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsC public interface EnvironmentVersionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -82,9 +88,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -100,9 +104,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -118,9 +120,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -135,6 +135,23 @@ Mono> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DestinationAsset body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -968,6 +985,327 @@ public EnvironmentVersionInner createOrUpdate( .getValue(); } + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java index 3c075afbe0d9c..7f5c47e1de9da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -84,136 +85,52 @@ public EnvironmentVersion get(String resourceGroupName, String workspaceName, St } } - public EnvironmentVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public EnvironmentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { + EnvironmentVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + public void publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "environments"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + public void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); } private EnvironmentVersionsClient serviceClient() { @@ -223,8 +140,4 @@ private EnvironmentVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public EnvironmentVersionImpl define(String name) { - return new EnvironmentVersionImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java new file mode 100644 index 0000000000000..7acc520150a42 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; +import com.azure.resourcemanager.machinelearning.models.Feature; +import com.azure.resourcemanager.machinelearning.models.FeatureProperties; + +public final class FeatureImpl implements Feature { + private FeatureInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + FeatureImpl( + FeatureInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager 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 FeatureProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public FeatureInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java new file mode 100644 index 0000000000000..86b9c2d632438 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java @@ -0,0 +1,792 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; +import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in FeaturesClient. */ +public final class FeaturesClientImpl implements FeaturesClient { + /** The proxy service used to perform REST calls. */ + private final FeaturesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of FeaturesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(FeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesFeatures to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface FeaturesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("featuresetName") String featuresetName, + @PathParam("featuresetVersion") String featuresetVersion, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, + @QueryParam("featureName") String featureName, + @QueryParam("description") String description, + @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("featuresetName") String featuresetName, + @PathParam("featuresetVersion") String featuresetVersion, + @PathParam("featureName") String featureName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (featuresetName == null) { + return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); + } + if (featuresetVersion == null) { + return Mono + .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + this.client.getApiVersion(), + skip, + tags, + featureName, + description, + listViewType, + pageSize, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (featuresetName == null) { + return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); + } + if (featuresetVersion == null) { + return Mono + .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + this.client.getApiVersion(), + skip, + tags, + featureName, + description, + listViewType, + pageSize, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion) { + final String skip = null; + final String tags = null; + final String featureName = null; + final String description = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion) { + final String skip = null; + final String tags = null; + final String featureName = null; + final String description = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize)); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize, + context)); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (featuresetName == null) { + return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); + } + if (featuresetVersion == null) { + return Mono + .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); + } + if (featureName == null) { + return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + featureName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (featuresetName == null) { + return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); + } + if (featuresetVersion == null) { + return Mono + .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); + } + if (featureName == null) { + return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + featureName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName) { + return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName, + Context context) { + return getWithResponseAsync( + resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, context) + .block(); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureInner get( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName) { + return getWithResponse( + resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, Context.NONE) + .getValue(); + } + + /** + * 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 a paginated list of Feature entities 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 a paginated list of Feature entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java new file mode 100644 index 0000000000000..3005fa5ce181e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; +import com.azure.resourcemanager.machinelearning.models.Feature; +import com.azure.resourcemanager.machinelearning.models.Features; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +public final class FeaturesImpl implements Features { + private static final ClientLogger LOGGER = new ClientLogger(FeaturesImpl.class); + + private final FeaturesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public FeaturesImpl( + FeaturesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, featuresetName, featuresetVersion); + return Utils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + workspaceName, + featuresetName, + featuresetVersion, + skip, + tags, + featureName, + description, + listViewType, + pageSize, + context); + return Utils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FeatureImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Feature get( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName) { + FeatureInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName); + if (inner != null) { + return new FeatureImpl(inner, this.manager()); + } else { + return null; + } + } + + private FeaturesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java new file mode 100644 index 0000000000000..57f427ec478a9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; + +public final class FeaturesetContainerImpl + implements FeaturesetContainer, FeaturesetContainer.Definition, FeaturesetContainer.Update { + private FeaturesetContainerInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FeaturesetContainerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FeaturesetContainerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + public FeaturesetContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public FeaturesetContainer create() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public FeaturesetContainer create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + FeaturesetContainerImpl( + String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new FeaturesetContainerInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public FeaturesetContainerImpl update() { + return this; + } + + public FeaturesetContainer apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public FeaturesetContainer apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + FeaturesetContainerImpl( + FeaturesetContainerInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "featuresets"); + } + + public FeaturesetContainer refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getValue(); + return this; + } + + public FeaturesetContainer refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetContainers() + .getEntityWithResponse(resourceGroupName, workspaceName, name, context) + .getValue(); + return this; + } + + public FeaturesetContainerImpl withProperties(FeaturesetContainerProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java new file mode 100644 index 0000000000000..e59c7f3f3f0b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java @@ -0,0 +1,1256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesetContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 FeaturesetContainersClient. */ +public final class FeaturesetContainersClientImpl implements FeaturesetContainersClient { + /** The proxy service used to perform REST calls. */ + private final FeaturesetContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of FeaturesetContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturesetContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(FeaturesetContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesFeaturesetContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface FeaturesetContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, + @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getEntity( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FeaturesetContainerInner body, + @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); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name) { + deleteAsync(resourceGroupName, workspaceName, name).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, Context context) { + deleteAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getEntityWithResponseAsync( + String resourceGroupName, String workspaceName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getEntity( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getEntityWithResponseAsync( + String resourceGroupName, String workspaceName, String name, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getEntity( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getEntityAsync(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetContainerInner.class, + FeaturesetContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetContainerInner.class, + FeaturesetContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + } + + /** + * 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 a paginated list of FeaturesetContainer entities 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 a paginated list of FeaturesetContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java new file mode 100644 index 0000000000000..996a5095328f8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesetContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainers; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +public final class FeaturesetContainersImpl implements FeaturesetContainers { + private static final ClientLogger LOGGER = new ClientLogger(FeaturesetContainersImpl.class); + + private final FeaturesetContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public FeaturesetContainersImpl( + FeaturesetContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context); + return Utils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, context); + } + + public Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + Response inner = + this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FeaturesetContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name) { + FeaturesetContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); + if (inner != null) { + return new FeaturesetContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturesetContainer getEntityById(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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + return this.getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + public Response getEntityByIdWithResponse(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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + return this.getEntityWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private FeaturesetContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public FeaturesetContainerImpl define(String name) { + return new FeaturesetContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java new file mode 100644 index 0000000000000..90a0a7c5e1653 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.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.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; +import java.util.Collections; +import java.util.List; + +public final class FeaturesetVersionBackfillResponseImpl implements FeaturesetVersionBackfillResponse { + private FeaturesetVersionBackfillResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + FeaturesetVersionBackfillResponseImpl( + FeaturesetVersionBackfillResponseInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List jobIds() { + List inner = this.innerModel().jobIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public FeaturesetVersionBackfillResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java new file mode 100644 index 0000000000000..97d7356c87e36 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.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.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; + +public final class FeaturesetVersionImpl + implements FeaturesetVersion, FeaturesetVersion.Definition, FeaturesetVersion.Update { + private FeaturesetVersionInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FeaturesetVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FeaturesetVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + private String version; + + public FeaturesetVersionImpl withExistingFeatureset(String resourceGroupName, String workspaceName, String name) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.name = name; + return this; + } + + public FeaturesetVersion create() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); + return this; + } + + public FeaturesetVersion create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); + return this; + } + + FeaturesetVersionImpl( + String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new FeaturesetVersionInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public FeaturesetVersionImpl update() { + return this; + } + + public FeaturesetVersion apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); + return this; + } + + public FeaturesetVersion apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); + return this; + } + + FeaturesetVersionImpl( + FeaturesetVersionInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "featuresets"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + } + + public FeaturesetVersion refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getValue(); + return this; + } + + public FeaturesetVersion refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturesetVersions() + .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getValue(); + return this; + } + + public FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body) { + return serviceManager.featuresetVersions().backfill(resourceGroupName, workspaceName, name, version, body); + } + + public FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body, Context context) { + return serviceManager + .featuresetVersions() + .backfill(resourceGroupName, workspaceName, name, version, body, context); + } + + public FeaturesetVersionImpl withProperties(FeaturesetVersionProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java new file mode 100644 index 0000000000000..c8a6c2f9c450b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java @@ -0,0 +1,1812 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.FeaturesetVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 FeaturesetVersionsClient. */ +public final class FeaturesetVersionsClientImpl implements FeaturesetVersionsClient { + /** The proxy service used to perform REST calls. */ + private final FeaturesetVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of FeaturesetVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturesetVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy.create(FeaturesetVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesFeaturesetVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface FeaturesetVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, + @QueryParam("version") String version, + @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FeaturesetVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> backfill( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FeaturesetVersionBackfillRequest body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, 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 (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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, String version) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, String version) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, String version, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, String version) { + deleteAsync(resourceGroupName, workspaceName, name, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, String version, Context context) { + deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String name, 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 (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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetVersionInner.class, + FeaturesetVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetVersionInner.class, + FeaturesetVersionInner.class, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> backfillWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .backfill( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> backfillWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .backfill( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetVersionBackfillResponseInner> + beginBackfillAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + Mono>> mono = + backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetVersionBackfillResponseInner.class, + FeaturesetVersionBackfillResponseInner.class, + this.client.getContext()); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturesetVersionBackfillResponseInner> + beginBackfillAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturesetVersionBackfillResponseInner.class, + FeaturesetVersionBackfillResponseInner.class, + context); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetVersionBackfillResponseInner> + beginBackfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of response payload for creating a backfill request for a given + * feature set version. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturesetVersionBackfillResponseInner> + beginBackfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context) { + return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono backfillAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + return beginBackfillAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono backfillAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context) { + return beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionBackfillResponseInner backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + return backfillAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionBackfillResponseInner backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context) { + return backfillAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + + /** + * 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 a paginated list of FeaturesetVersion entities 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 a paginated list of FeaturesetVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java new file mode 100644 index 0000000000000..1edcc1feb3dac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturesetVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersions; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +public final class FeaturesetVersionsImpl implements FeaturesetVersions { + private static final ClientLogger LOGGER = new ClientLogger(FeaturesetVersionsImpl.class); + + private final FeaturesetVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public FeaturesetVersionsImpl( + FeaturesetVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context); + return Utils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + } + + public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FeaturesetVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version) { + FeaturesetVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new FeaturesetVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturesetVersionBackfillResponse backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body) { + FeaturesetVersionBackfillResponseInner inner = + this.serviceClient().backfill(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new FeaturesetVersionBackfillResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturesetVersionBackfillResponse backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context) { + FeaturesetVersionBackfillResponseInner inner = + this.serviceClient().backfill(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new FeaturesetVersionBackfillResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturesetVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featuresets"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'featuresets'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, version, context); + } + + private FeaturesetVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public FeaturesetVersionImpl define(String name) { + return new FeaturesetVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java new file mode 100644 index 0000000000000..afcc924545ca4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; + +public final class FeaturestoreEntityContainerImpl + implements FeaturestoreEntityContainer, FeaturestoreEntityContainer.Definition, FeaturestoreEntityContainer.Update { + private FeaturestoreEntityContainerInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FeaturestoreEntityContainerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FeaturestoreEntityContainerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + public FeaturestoreEntityContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public FeaturestoreEntityContainer create() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public FeaturestoreEntityContainer create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + FeaturestoreEntityContainerImpl( + String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new FeaturestoreEntityContainerInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public FeaturestoreEntityContainerImpl update() { + return this; + } + + public FeaturestoreEntityContainer apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public FeaturestoreEntityContainer apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + FeaturestoreEntityContainerImpl( + FeaturestoreEntityContainerInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "featurestoreEntities"); + } + + public FeaturestoreEntityContainer refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getValue(); + return this; + } + + public FeaturestoreEntityContainer refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityContainers() + .getEntityWithResponse(resourceGroupName, workspaceName, name, context) + .getValue(); + return this; + } + + public FeaturestoreEntityContainerImpl withProperties(FeaturestoreEntityContainerProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java new file mode 100644 index 0000000000000..27e47e6ed9d6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java @@ -0,0 +1,1285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturestoreEntityContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 FeaturestoreEntityContainersClient. */ +public final class FeaturestoreEntityContainersClientImpl implements FeaturestoreEntityContainersClient { + /** The proxy service used to perform REST calls. */ + private final FeaturestoreEntityContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of FeaturestoreEntityContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturestoreEntityContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + FeaturestoreEntityContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesFeaturestoreEntityContainers to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface FeaturestoreEntityContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, + @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getEntity( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FeaturestoreEntityContainerInner body, + @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); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy)); + } + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name) { + deleteAsync(resourceGroupName, workspaceName, name).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, Context context) { + deleteAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getEntityWithResponseAsync( + String resourceGroupName, String workspaceName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getEntity( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getEntityWithResponseAsync( + String resourceGroupName, String workspaceName, String name, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getEntity( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getEntityAsync( + String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturestoreEntityContainerInner> + beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturestoreEntityContainerInner.class, + FeaturestoreEntityContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturestoreEntityContainerInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturestoreEntityContainerInner.class, + FeaturestoreEntityContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturestoreEntityContainerInner> + beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturestoreEntityContainerInner> + beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityContainerInner createOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityContainerInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + FeaturestoreEntityContainerInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + } + + /** + * 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 a paginated list of FeaturestoreEntityContainer entities 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 a paginated list of FeaturestoreEntityContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java new file mode 100644 index 0000000000000..003ea3c77664d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturestoreEntityContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainers; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +public final class FeaturestoreEntityContainersImpl implements FeaturestoreEntityContainers { + private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityContainersImpl.class); + + private final FeaturestoreEntityContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public FeaturestoreEntityContainersImpl( + FeaturestoreEntityContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new FeaturestoreEntityContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + workspaceName, + skip, + tags, + listViewType, + pageSize, + name, + description, + createdBy, + context); + return Utils.mapPage(inner, inner1 -> new FeaturestoreEntityContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, context); + } + + public Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + Response inner = + this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FeaturestoreEntityContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name) { + FeaturestoreEntityContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); + if (inner != null) { + return new FeaturestoreEntityContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturestoreEntityContainer getEntityById(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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + return this.getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + public Response getEntityByIdWithResponse(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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + return this.getEntityWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + this.delete(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private FeaturestoreEntityContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public FeaturestoreEntityContainerImpl define(String name) { + return new FeaturestoreEntityContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java new file mode 100644 index 0000000000000..6b477a1a0e408 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; + +public final class FeaturestoreEntityVersionImpl + implements FeaturestoreEntityVersion, FeaturestoreEntityVersion.Definition, FeaturestoreEntityVersion.Update { + private FeaturestoreEntityVersionInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FeaturestoreEntityVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public FeaturestoreEntityVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + private String version; + + public FeaturestoreEntityVersionImpl withExistingFeaturestoreEntity( + String resourceGroupName, String workspaceName, String name) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.name = name; + return this; + } + + public FeaturestoreEntityVersion create() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); + return this; + } + + public FeaturestoreEntityVersion create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); + return this; + } + + FeaturestoreEntityVersionImpl( + String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new FeaturestoreEntityVersionInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public FeaturestoreEntityVersionImpl update() { + return this; + } + + public FeaturestoreEntityVersion apply() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE); + return this; + } + + public FeaturestoreEntityVersion apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .createOrUpdate(resourceGroupName, workspaceName, name, version, this.innerModel(), context); + return this; + } + + FeaturestoreEntityVersionImpl( + FeaturestoreEntityVersionInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "featurestoreEntities"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + } + + public FeaturestoreEntityVersion refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getValue(); + return this; + } + + public FeaturestoreEntityVersion refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getFeaturestoreEntityVersions() + .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getValue(); + return this; + } + + public FeaturestoreEntityVersionImpl withProperties(FeaturestoreEntityVersionProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java new file mode 100644 index 0000000000000..eb69b740c3809 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java @@ -0,0 +1,1456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturestoreEntityVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 FeaturestoreEntityVersionsClient. */ +public final class FeaturestoreEntityVersionsClientImpl implements FeaturestoreEntityVersionsClient { + /** The proxy service used to perform REST calls. */ + private final FeaturestoreEntityVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of FeaturestoreEntityVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeaturestoreEntityVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + FeaturestoreEntityVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesFeaturestoreEntityVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface FeaturestoreEntityVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, + @QueryParam("version") String version, + @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FeaturestoreEntityVersionInner body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + this.client.getApiVersion(), + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, 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 (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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 workspaceName, String name, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, String version) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 workspaceName, String name, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, String version) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, String version, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, String version) { + deleteAsync(resourceGroupName, workspaceName, name, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String name, String version, Context context) { + deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String name, 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 (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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityVersionInner get( + String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturestoreEntityVersionInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturestoreEntityVersionInner.class, + FeaturestoreEntityVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FeaturestoreEntityVersionInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FeaturestoreEntityVersionInner.class, + FeaturestoreEntityVersionInner.class, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityVersionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturestoreEntityVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + + /** + * 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 a paginated list of FeaturestoreEntityVersion entities 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 a paginated list of FeaturestoreEntityVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java new file mode 100644 index 0000000000000..2392037ac4def --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.FeaturestoreEntityVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersions; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +public final class FeaturestoreEntityVersionsImpl implements FeaturestoreEntityVersions { + private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityVersionsImpl.class); + + private final FeaturestoreEntityVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public FeaturestoreEntityVersionsImpl( + FeaturestoreEntityVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, name); + return Utils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + workspaceName, + name, + skip, + tags, + listViewType, + pageSize, + versionName, + version, + description, + createdBy, + stage, + context); + return Utils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + } + + public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FeaturestoreEntityVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version) { + FeaturestoreEntityVersionInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new FeaturestoreEntityVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public FeaturestoreEntityVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = Utils.getValueFromIdByName(id, "featurestoreEntities"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'featurestoreEntities'.", + id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, version, context); + } + + private FeaturestoreEntityVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public FeaturestoreEntityVersionImpl define(String name) { + return new FeaturestoreEntityVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java new file mode 100644 index 0000000000000..463a334f83396 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasResponseDto; + +public final class GetBlobReferenceSasResponseDtoImpl implements GetBlobReferenceSasResponseDto { + private GetBlobReferenceSasResponseDtoInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + GetBlobReferenceSasResponseDtoImpl( + GetBlobReferenceSasResponseDtoInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public GetBlobReferenceForConsumptionDto blobReferenceForConsumption() { + return this.innerModel().blobReferenceForConsumption(); + } + + public GetBlobReferenceSasResponseDtoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java index f19ceaef9cf49..096a9ddf445a8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java @@ -46,20 +46,20 @@ public final class JobsClientImpl implements JobsClient { private final JobsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of JobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + JobsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to + * The interface defining all the services for AzureMachineLearningServicesJobs to be used by the proxy service to * perform REST calls. */ @Host("{$host}") @@ -67,8 +67,7 @@ public final class JobsClientImpl implements JobsClient { public interface JobsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,13 +80,13 @@ Mono> list( @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("properties") String properties, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -102,8 +101,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -118,8 +116,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -135,8 +132,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> cancel( @@ -169,6 +165,8 @@ Mono> listNext( * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,7 +180,8 @@ private Mono> listSinglePageAsync( String skip, String jobType, String tag, - ListViewType listViewType) { + ListViewType listViewType, + String properties) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -217,6 +216,7 @@ private Mono> listSinglePageAsync( jobType, tag, listViewType, + properties, accept, context)) .>map( @@ -240,6 +240,8 @@ private Mono> listSinglePageAsync( * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -255,6 +257,7 @@ private Mono> listSinglePageAsync( String jobType, String tag, ListViewType listViewType, + String properties, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -288,6 +291,7 @@ private Mono> listSinglePageAsync( jobType, tag, listViewType, + properties, accept, context) .map( @@ -310,6 +314,8 @@ private Mono> listSinglePageAsync( * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -322,9 +328,10 @@ private PagedFlux listAsync( String skip, String jobType, String tag, - ListViewType listViewType) { + ListViewType listViewType, + String properties) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -344,8 +351,9 @@ private PagedFlux listAsync(String resourceGroupName, String works final String jobType = null; final String tag = null; final ListViewType listViewType = null; + final String properties = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -358,6 +366,8 @@ private PagedFlux listAsync(String resourceGroupName, String works * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -372,9 +382,12 @@ private PagedFlux listAsync( String jobType, String tag, ListViewType listViewType, + String properties, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context), + () -> + listSinglePageAsync( + resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -394,7 +407,9 @@ public PagedIterable list(String resourceGroupName, String workspa final String jobType = null; final String tag = null; final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType)); + final String properties = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties)); } /** @@ -406,6 +421,8 @@ public PagedIterable list(String resourceGroupName, String workspa * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -420,9 +437,10 @@ public PagedIterable list( String jobType, String tag, ListViewType listViewType, + String properties, Context context) { return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context)); + listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context)); } /** @@ -830,7 +848,8 @@ public JobBaseInner get(String resourceGroupName, String workspaceName, String i } /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -891,7 +910,8 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -950,7 +970,8 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -969,7 +990,8 @@ private Mono createOrUpdateAsync( } /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -988,7 +1010,8 @@ public Response createOrUpdateWithResponse( } /** - * Creates and executes a Job. + * Creates and executes a Job. For update case, the Tags in the definition passed in will replace Tags in the + * existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java index 8acf713adc9b9..dd1c608ea6e4e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java @@ -40,9 +40,12 @@ public PagedIterable list( String jobType, String tag, ListViewType listViewType, + String properties, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context); + this + .serviceClient() + .list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context); return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java new file mode 100644 index 0000000000000..7c5b96999249b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; + +public final class ManagedNetworkProvisionStatusImpl implements ManagedNetworkProvisionStatus { + private ManagedNetworkProvisionStatusInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ManagedNetworkProvisionStatusImpl( + ManagedNetworkProvisionStatusInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean sparkReady() { + return this.innerModel().sparkReady(); + } + + public ManagedNetworkStatus status() { + return this.innerModel().status(); + } + + public ManagedNetworkProvisionStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java new file mode 100644 index 0000000000000..85288a57aa298 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +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.Post; +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.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.machinelearning.fluent.ManagedNetworkProvisionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; +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 ManagedNetworkProvisionsClient. */ +public final class ManagedNetworkProvisionsClientImpl implements ManagedNetworkProvisionsClient { + /** The proxy service used to perform REST calls. */ + private final ManagedNetworkProvisionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of ManagedNetworkProvisionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedNetworkProvisionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(ManagedNetworkProvisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesManagedNetworkProvisions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ManagedNetworkProvisionsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> provisionManagedNetwork( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedNetworkProvisionOptions body, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> provisionManagedNetworkWithResponseAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .provisionManagedNetwork( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> provisionManagedNetworkWithResponseAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .provisionManagedNetwork( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetworkAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body) { + Mono>> mono = + provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedNetworkProvisionStatusInner.class, + ManagedNetworkProvisionStatusInner.class, + this.client.getContext()); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetworkAsync(String resourceGroupName, String workspaceName) { + final ManagedNetworkProvisionOptions body = null; + Mono>> mono = + provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedNetworkProvisionStatusInner.class, + ManagedNetworkProvisionStatusInner.class, + this.client.getContext()); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetworkAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedNetworkProvisionStatusInner.class, + ManagedNetworkProvisionStatusInner.class, + context); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetwork(String resourceGroupName, String workspaceName) { + final ManagedNetworkProvisionOptions body = null; + return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { + return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono provisionManagedNetworkAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body) { + return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono provisionManagedNetworkAsync( + String resourceGroupName, String workspaceName) { + final ManagedNetworkProvisionOptions body = null; + return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono provisionManagedNetworkAsync( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { + return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName) { + final ManagedNetworkProvisionOptions body = null; + return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body).block(); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkProvisionStatusInner provisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { + return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java new file mode 100644 index 0000000000000..2dbddcab78d7f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.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.machinelearning.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; + +public final class ManagedNetworkProvisionsImpl implements ManagedNetworkProvisions { + private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkProvisionsImpl.class); + + private final ManagedNetworkProvisionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ManagedNetworkProvisionsImpl( + ManagedNetworkProvisionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName) { + ManagedNetworkProvisionStatusInner inner = + this.serviceClient().provisionManagedNetwork(resourceGroupName, workspaceName); + if (inner != null) { + return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagedNetworkProvisionStatus provisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { + ManagedNetworkProvisionStatusInner inner = + this.serviceClient().provisionManagedNetwork(resourceGroupName, workspaceName, body, context); + if (inner != null) { + return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + private ManagedNetworkProvisionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java new file mode 100644 index 0000000000000..48288ddec1b67 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import java.util.Collections; +import java.util.Map; + +public final class ManagedNetworkSettingsImpl implements ManagedNetworkSettings { + private ManagedNetworkSettingsInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ManagedNetworkSettingsImpl( + ManagedNetworkSettingsInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public IsolationMode isolationMode() { + return this.innerModel().isolationMode(); + } + + public String networkId() { + return this.innerModel().networkId(); + } + + public Map outboundRules() { + Map inner = this.innerModel().outboundRules(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedNetworkProvisionStatus status() { + ManagedNetworkProvisionStatusInner inner = this.innerModel().status(); + if (inner != null) { + return new ManagedNetworkProvisionStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public ManagedNetworkSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java new file mode 100644 index 0000000000000..2d9f0e42bbdad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java @@ -0,0 +1,1129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ManagedNetworkSettingsRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; +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 ManagedNetworkSettingsRulesClient. */ +public final class ManagedNetworkSettingsRulesClientImpl implements ManagedNetworkSettingsRulesClient { + /** The proxy service used to perform REST calls. */ + private final ManagedNetworkSettingsRulesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of ManagedNetworkSettingsRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedNetworkSettingsRulesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + ManagedNetworkSettingsRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesManagedNetworkSettingsRules to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ManagedNetworkSettingsRulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") OutboundRuleBasicResourceInner body, + @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); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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())); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName 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, + workspaceName, + ruleName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String ruleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String ruleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String ruleName) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName).getSyncPoller(); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String ruleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context).getSyncPoller(); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName) { + return beginDeleteAsync(resourceGroupName, workspaceName, ruleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String ruleName) { + deleteAsync(resourceGroupName, workspaceName, ruleName).block(); + } + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { + deleteAsync(resourceGroupName, workspaceName, ruleName, context).block(); + } + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName 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, + workspaceName, + ruleName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String ruleName) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleName, context).block(); + } + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName) { + return getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE).getValue(); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace along with {@link + * Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OutboundRuleBasicResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OutboundRuleBasicResourceInner.class, + OutboundRuleBasicResourceInner.class, + this.client.getContext()); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OutboundRuleBasicResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OutboundRuleBasicResourceInner.class, + OutboundRuleBasicResourceInner.class, + context); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).getSyncPoller(); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine + * learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).getSyncPoller(); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).block(); + } + + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String ruleName, + OutboundRuleBasicResourceInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).block(); + } + + /** + * 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 outbound rules for the managed network of a machine learning workspace 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 list of outbound rules for the managed network of a machine learning workspace 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java new file mode 100644 index 0000000000000..156e0f2d4620f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ManagedNetworkSettingsRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; + +public final class ManagedNetworkSettingsRulesImpl implements ManagedNetworkSettingsRules { + private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkSettingsRulesImpl.class); + + private final ManagedNetworkSettingsRulesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ManagedNetworkSettingsRulesImpl( + ManagedNetworkSettingsRulesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String ruleName) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleName); + } + + public void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleName, context); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OutboundRuleBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName) { + OutboundRuleBasicResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleName); + if (inner != null) { + return new OutboundRuleBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public OutboundRuleBasicResource 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String ruleName = Utils.getValueFromIdByName(id, "outboundRules"); + if (ruleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, ruleName, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String ruleName = Utils.getValueFromIdByName(id, "outboundRules"); + if (ruleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, ruleName, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String ruleName = Utils.getValueFromIdByName(id, "outboundRules"); + if (ruleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); + } + this.delete(resourceGroupName, workspaceName, ruleName, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String ruleName = Utils.getValueFromIdByName(id, "outboundRules"); + if (ruleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'outboundRules'.", id))); + } + this.delete(resourceGroupName, workspaceName, ruleName, context); + } + + private ManagedNetworkSettingsRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public OutboundRuleBasicResourceImpl define(String name) { + return new OutboundRuleBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java index dc2e9e476a07f..8e02d001475eb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java @@ -49,13 +49,13 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String modelName; - public ModelContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + public ModelContainerImpl withExistingRegistry(String resourceGroupName, String registryName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; + this.registryName = registryName; return this; } @@ -63,9 +63,8 @@ public ModelContainer create() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), Context.NONE); return this; } @@ -73,16 +72,15 @@ public ModelContainer create(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), context); return this; } ModelContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new ModelContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.modelName = name; } public ModelContainerImpl update() { @@ -93,9 +91,8 @@ public ModelContainer apply() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), Context.NONE); return this; } @@ -103,9 +100,8 @@ public ModelContainer apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + .getRegistryModelContainers() + .createOrUpdate(resourceGroupName, registryName, modelName, this.innerModel(), context); return this; } @@ -115,16 +111,16 @@ public ModelContainer apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = Utils.getValueFromIdByName(innerObject.id(), "models"); } public ModelContainer refresh() { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getRegistryModelContainers() + .getWithResponse(resourceGroupName, registryName, modelName, Context.NONE) .getValue(); return this; } @@ -133,8 +129,8 @@ public ModelContainer refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) + .getRegistryModelContainers() + .getWithResponse(resourceGroupName, registryName, modelName, context) .getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java index 85257b0ad80f5..daa9d4adf43c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java @@ -40,21 +40,21 @@ public final class ModelContainersClientImpl implements ModelContainersClient { private final ModelContainersService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelContainersClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelContainers to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesModelContainers to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -62,8 +62,7 @@ public final class ModelContainersClientImpl implements ModelContainersClient { public interface ModelContainersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -80,8 +79,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -96,8 +94,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -112,8 +109,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java index d45d40ce56ae0..9f8487328cd02 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java @@ -79,108 +79,29 @@ public ModelContainer get(String resourceGroupName, String workspaceName, String } } - public ModelContainer 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { + Response inner = + this.serviceClient().createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + public ModelContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { + ModelContainerInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } private ModelContainersClient serviceClient() { @@ -190,8 +111,4 @@ private ModelContainersClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ModelContainerImpl define(String name) { - return new ModelContainerImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java index 8d4bf21616863..5b4a21a5054b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java @@ -4,11 +4,14 @@ package com.azure.resourcemanager.machinelearning.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.models.ModelVersion; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; public final class ModelVersionImpl implements ModelVersion, ModelVersion.Definition, ModelVersion.Update { private ModelVersionInner innerObject; @@ -49,16 +52,16 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String resourceGroupName; - private String workspaceName; + private String registryName; - private String name; + private String modelName; private String version; - public ModelVersionImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { + public ModelVersionImpl withExistingModel(String resourceGroupName, String registryName, String modelName) { this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; + this.registryName = registryName; + this.modelName = modelName; return this; } @@ -66,10 +69,8 @@ public ModelVersion create() { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), Context.NONE); return this; } @@ -77,9 +78,8 @@ public ModelVersion create(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), context); return this; } @@ -97,10 +97,8 @@ public ModelVersion apply() { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), Context.NONE); return this; } @@ -108,9 +106,8 @@ public ModelVersion apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + .getRegistryModelVersions() + .createOrUpdate(resourceGroupName, registryName, modelName, version, this.innerModel(), context); return this; } @@ -120,8 +117,8 @@ public ModelVersion apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = Utils.getValueFromIdByName(innerObject.id(), "models"); this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); } @@ -129,8 +126,8 @@ public ModelVersion refresh() { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) + .getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE) .getValue(); return this; } @@ -139,12 +136,26 @@ public ModelVersion refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) + .getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, context) .getValue(); return this; } + public Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context) { + return serviceManager + .registryModelVersions() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, modelName, version, body, context); + } + + public PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body) { + return serviceManager + .registryModelVersions() + .createOrGetStartPendingUpload(resourceGroupName, registryName, modelName, version, body); + } + public ModelVersionImpl withProperties(ModelVersionProperties properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java index 7c3ba0c615b06..d9cf9bbfb2f75 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -26,12 +27,18 @@ 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.machinelearning.fluent.ModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; +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 ModelVersionsClient. */ @@ -40,21 +47,21 @@ public final class ModelVersionsClientImpl implements ModelVersionsClient { private final ModelVersionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelVersionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(ModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelVersions to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesModelVersions to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -62,8 +69,7 @@ public final class ModelVersionsClientImpl implements ModelVersionsClient { public interface ModelVersionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -88,8 +94,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -105,8 +110,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -122,8 +126,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -138,6 +141,23 @@ Mono> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DestinationAsset body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1125,6 +1145,327 @@ public ModelVersionInner createOrUpdate( .getValue(); } + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> publishWithResponseAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .publish( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginPublishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginPublish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publishAsync( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Publish version asset into registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java index c592838cdb9c1..5c967120ef1d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.ModelVersion; import com.azure.resourcemanager.machinelearning.models.ModelVersions; @@ -103,136 +104,52 @@ public ModelVersion get(String resourceGroupName, String workspaceName, String n } } - public ModelVersion 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + public ModelVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { + ModelVersionInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, workspaceName, name, version, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + public void publish( + String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); } - public Response 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String name = Utils.getValueFromIdByName(id, "models"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); - } - String version = Utils.getValueFromIdByName(id, "versions"); - if (version == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + public void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body, context); } private ModelVersionsClient serviceClient() { @@ -242,8 +159,4 @@ private ModelVersionsClient serviceClient() { private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { return this.serviceManager; } - - public ModelVersionImpl define(String name) { - return new ModelVersionImpl(name, this.manager()); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java index 8008e9361ade5..e8d8d59cb2b24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java @@ -51,31 +51,29 @@ public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClien private final OnlineDeploymentsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineDeploymentsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineDeployments to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesOnlineDeployments to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface OnlineDeploymentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -93,9 +91,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -111,9 +107,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -129,9 +123,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -148,9 +140,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -167,9 +157,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/getLogs") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getLogs( @@ -186,9 +174,7 @@ Mono> getLogs( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/skus") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSkus( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java index 07f7cfd7be987..3081a4589abc9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java @@ -52,21 +52,21 @@ public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { private final OnlineEndpointsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineEndpointsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineEndpoints to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesOnlineEndpoints to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -74,8 +74,7 @@ public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { public interface OnlineEndpointsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -96,8 +95,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -112,8 +110,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -128,8 +125,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -145,8 +141,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -162,9 +157,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys( @@ -179,9 +172,7 @@ Mono> listKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/regenerateKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> regenerateKeys( @@ -197,8 +188,7 @@ Mono>> regenerateKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getToken( @@ -2047,7 +2037,7 @@ public void regenerateKeys( } /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -2100,7 +2090,7 @@ private Mono> getTokenWithResponseAsync( } /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -2151,7 +2141,7 @@ private Mono> getTokenWithResponseAsync( } /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -2169,7 +2159,7 @@ private Mono getTokenAsync( } /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -2187,7 +2177,7 @@ public Response getTokenWithResponse( } /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java new file mode 100644 index 0000000000000..84d3ba8fd7140 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; +import com.azure.resourcemanager.machinelearning.models.ActionType; +import com.azure.resourcemanager.machinelearning.models.Operation; +import com.azure.resourcemanager.machinelearning.models.OperationDisplay; +import com.azure.resourcemanager.machinelearning.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + OperationImpl( + OperationInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java index da8db6fc97aac..83592638a225c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java @@ -25,8 +25,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationListResult; +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; +import com.azure.resourcemanager.machinelearning.models.OperationListResult; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ @@ -35,21 +35,21 @@ public final class OperationsClientImpl implements OperationsClient { private final OperationsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OperationsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOperations to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesOperations to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -59,7 +59,7 @@ public interface OperationsService { @Get("/providers/Microsoft.MachineLearningServices/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, @@ -71,11 +71,11 @@ 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 array of operations supported by the resource provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( @@ -86,7 +86,7 @@ private Mono> listSinglePageAsync() { return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) @@ -100,11 +100,11 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 array of operations supported by the resource provider along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -126,10 +126,11 @@ private Mono> listSinglePageAsync(Context conte * * @throws 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 array of operations supported by the resource provider as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { + private PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync()); } @@ -140,10 +141,11 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 array of operations supported by the resource provider as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { + private PagedFlux listAsync(Context context) { return new PagedFlux<>(() -> listSinglePageAsync(context)); } @@ -152,11 +154,11 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable list() { return new PagedIterable<>(listAsync()); } @@ -167,11 +169,11 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { + public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java index 9a500e365bd68..9f6f5297db81c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java @@ -8,8 +8,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; +import com.azure.resourcemanager.machinelearning.models.Operation; import com.azure.resourcemanager.machinelearning.models.Operations; public final class OperationsImpl implements Operations { @@ -25,14 +25,14 @@ public OperationsImpl( this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new AmlOperationImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AmlOperationImpl(inner1, this.manager())); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java new file mode 100644 index 0000000000000..8a190d1d37aa5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; + +public final class OutboundRuleBasicResourceImpl + implements OutboundRuleBasicResource, OutboundRuleBasicResource.Definition, OutboundRuleBasicResource.Update { + private OutboundRuleBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public OutboundRule properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public OutboundRuleBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String ruleName; + + public OutboundRuleBasicResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public OutboundRuleBasicResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), Context.NONE); + return this; + } + + public OutboundRuleBasicResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), context); + return this; + } + + OutboundRuleBasicResourceImpl( + String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new OutboundRuleBasicResourceInner(); + this.serviceManager = serviceManager; + this.ruleName = name; + } + + public OutboundRuleBasicResourceImpl update() { + return this; + } + + public OutboundRuleBasicResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), Context.NONE); + return this; + } + + public OutboundRuleBasicResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .createOrUpdate(resourceGroupName, workspaceName, ruleName, this.innerModel(), context); + return this; + } + + OutboundRuleBasicResourceImpl( + OutboundRuleBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.ruleName = Utils.getValueFromIdByName(innerObject.id(), "outboundRules"); + } + + public OutboundRuleBasicResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE) + .getValue(); + return this; + } + + public OutboundRuleBasicResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getManagedNetworkSettingsRules() + .getWithResponse(resourceGroupName, workspaceName, ruleName, context) + .getValue(); + return this; + } + + public OutboundRuleBasicResourceImpl withProperties(OutboundRule properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java new file mode 100644 index 0000000000000..ce8b51c43cd07 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +public final class PendingUploadResponseDtoImpl implements PendingUploadResponseDto { + private PendingUploadResponseDtoInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + PendingUploadResponseDtoImpl( + PendingUploadResponseDtoInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public BlobReferenceForConsumptionDto blobReferenceForConsumption() { + return this.innerModel().blobReferenceForConsumption(); + } + + public String pendingUploadId() { + return this.innerModel().pendingUploadId(); + } + + public PendingUploadType pendingUploadType() { + return this.innerModel().pendingUploadType(); + } + + public PendingUploadResponseDtoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java index a2ee937022f0f..915fb24100535 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java @@ -39,14 +39,14 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi private final PrivateEndpointConnectionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateEndpointConnectionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create( @@ -55,16 +55,15 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesPrivateEndpointConnections to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -78,9 +77,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,9 +92,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -113,9 +108,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java index e5f6ffba120f0..2e60a8b24e537 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java @@ -31,14 +31,14 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource private final PrivateLinkResourcesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateLinkResourcesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -46,7 +46,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateLinkResources to be used by the + * The interface defining all the services for AzureMachineLearningServicesPrivateLinkResources to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -54,8 +54,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource public interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java index d639dc8a9983e..2ee62c5f0219c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java @@ -40,29 +40,28 @@ public final class QuotasClientImpl implements QuotasClient { private final QuotasService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of QuotasClientImpl. * * @param client the instance of the service client containing this operation class. */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { + QuotasClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesQuotas to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface QuotasService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}" - + "/updateQuotas") + "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java new file mode 100644 index 0000000000000..13e15158bc071 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java @@ -0,0 +1,1703 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; +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 RegistriesClient. */ +public final class RegistriesClientImpl implements RegistriesClient { + /** The proxy service used to perform REST calls. */ + private final RegistriesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistriesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistriesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistries to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistriesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialRegistryPartialTrackedResource body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RegistryInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> removeRegions( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RegistryInner body, + @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); + + @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); + } + + /** + * List registries by 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 paginated list of Registry entities 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.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List registries by 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 paginated list of Registry entities 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.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String registryName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName 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, + registryName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String registryName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName) { + return this.beginDeleteAsync(resourceGroupName, registryName).getSyncPoller(); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String registryName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, context).getSyncPoller(); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName) { + return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String registryName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName) { + deleteAsync(resourceGroupName, registryName).block(); + } + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, Context context) { + deleteAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String registryName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String registryName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); + } + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + return updateWithResponseAsync(resourceGroupName, registryName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body, Context context) { + return updateWithResponseAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * Update tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner update( + String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body) { + return updateWithResponse(resourceGroupName, registryName, body, Context.NONE).getValue(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, RegistryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RegistryInner.class, + RegistryInner.class, + this.client.getContext()); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, RegistryInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RegistryInner.class, RegistryInner.class, context); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body).getSyncPoller(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RegistryInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).getSyncPoller(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, body).block(); + } + + /** + * Create or update registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeRegionsWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .removeRegions( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeRegionsWithResponseAsync( + String resourceGroupName, String registryName, RegistryInner body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .removeRegions( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, RegistryInner> beginRemoveRegionsAsync( + String resourceGroupName, String registryName, RegistryInner body) { + Mono>> mono = removeRegionsWithResponseAsync(resourceGroupName, registryName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RegistryInner.class, + RegistryInner.class, + this.client.getContext()); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, RegistryInner> beginRemoveRegionsAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + removeRegionsWithResponseAsync(resourceGroupName, registryName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RegistryInner.class, RegistryInner.class, context); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RegistryInner> beginRemoveRegions( + String resourceGroupName, String registryName, RegistryInner body) { + return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body).getSyncPoller(); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RegistryInner> beginRemoveRegions( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body, context).getSyncPoller(); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeRegionsAsync(String resourceGroupName, String registryName, RegistryInner body) { + return beginRemoveRegionsAsync(resourceGroupName, registryName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeRegionsAsync( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return beginRemoveRegionsAsync(resourceGroupName, registryName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body) { + return removeRegionsAsync(resourceGroupName, registryName, body).block(); + } + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner removeRegions( + String resourceGroupName, String registryName, RegistryInner body, Context context) { + return removeRegionsAsync(resourceGroupName, registryName, body, context).block(); + } + + /** + * 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 a paginated list of Registry entities 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 a paginated list of Registry entities 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)); + } + + /** + * 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 a paginated list of Registry entities 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 a paginated list of Registry entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java new file mode 100644 index 0000000000000..6b6e120067a68 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistriesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.Registries; +import com.azure.resourcemanager.machinelearning.models.Registry; + +public final class RegistriesImpl implements Registries { + private static final ClientLogger LOGGER = new ClientLogger(RegistriesImpl.class); + + private final RegistriesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistriesImpl( + RegistriesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public void deleteByResourceGroup(String resourceGroupName, String registryName) { + this.serviceClient().delete(resourceGroupName, registryName); + } + + public void delete(String resourceGroupName, String registryName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, context); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String registryName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RegistryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Registry getByResourceGroup(String resourceGroupName, String registryName) { + RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body) { + RegistryInner inner = this.serviceClient().removeRegions(resourceGroupName, registryName, body); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context) { + RegistryInner inner = this.serviceClient().removeRegions(resourceGroupName, registryName, body, context); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Registry 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, registryName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + this.delete(resourceGroupName, registryName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + this.delete(resourceGroupName, registryName, context); + } + + private RegistriesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RegistryImpl define(String name) { + return new RegistryImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java new file mode 100644 index 0000000000000..5f96fb35999d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java @@ -0,0 +1,1115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; +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 RegistryCodeContainersClient. */ +public final class RegistryCodeContainersClientImpl implements RegistryCodeContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryCodeContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryCodeContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryCodeContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryCodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryCodeContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryCodeContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CodeContainerInner body, + @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); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, codeName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String codeName) { + return this.beginDeleteAsync(resourceGroupName, registryName, codeName).getSyncPoller(); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String codeName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, codeName, context).getSyncPoller(); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String codeName) { + return beginDeleteAsync(resourceGroupName, registryName, codeName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String codeName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String codeName) { + deleteAsync(resourceGroupName, registryName, codeName).block(); + } + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String codeName, Context context) { + deleteAsync(resourceGroupName, registryName, codeName, context).block(); + } + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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, + registryName, + codeName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String codeName) { + return getWithResponseAsync(resourceGroupName, registryName, codeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, context).block(); + } + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner get(String resourceGroupName, String registryName, String codeName) { + return getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CodeContainerInner.class, + CodeContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CodeContainerInner.class, CodeContainerInner.class, context); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).getSyncPoller(); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).getSyncPoller(); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, body).block(); + } + + /** + * Create or update Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).block(); + } + + /** + * 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 a paginated list of CodeContainer entities 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 a paginated list of CodeContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java new file mode 100644 index 0000000000000..091464b41387f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryCodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; +import com.azure.resourcemanager.machinelearning.models.CodeContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; + +public final class RegistryCodeContainersImpl implements RegistryCodeContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeContainersImpl.class); + + private final RegistryCodeContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryCodeContainersImpl( + RegistryCodeContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String codeName) { + this.serviceClient().delete(resourceGroupName, registryName, codeName); + } + + public void delete(String resourceGroupName, String registryName, String codeName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeContainer get(String resourceGroupName, String registryName, String codeName) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public CodeContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, context); + } + + private RegistryCodeContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CodeContainerImpl define(String name) { + return new CodeContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java new file mode 100644 index 0000000000000..7729f098b0bb2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java @@ -0,0 +1,1474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +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 RegistryCodeVersionsClient. */ +public final class RegistryCodeVersionsClientImpl implements RegistryCodeVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryCodeVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryCodeVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryCodeVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryCodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryCodeVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryCodeVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CodeVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PendingUploadRequestDto body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String codeName, String orderBy, Integer top, String skip) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String codeName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String codeName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, codeName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String codeName, String version) { + return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String codeName, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String codeName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String codeName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String codeName, String version) { + deleteAsync(resourceGroupName, registryName, codeName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String codeName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, codeName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String codeName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName 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.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String codeName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { + return getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CodeVersionInner.class, + CodeVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CodeVersionInner.class, CodeVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CodeVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner createOrUpdate( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String codeName, + String version, + CodeVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).block(); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, + String registryName, + String codeName, + String version, + PendingUploadRequestDto body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (codeName == null) { + return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + codeName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrGetStartPendingUploadAsync( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, codeName, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String codeName, + String version, + PendingUploadRequestDto body, + Context context) { + return createOrGetStartPendingUploadWithResponseAsync( + resourceGroupName, registryName, codeName, version, body, context) + .block(); + } + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, codeName, version, body, Context.NONE) + .getValue(); + } + + /** + * 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 a paginated list of CodeVersion entities 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 a paginated list of CodeVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java new file mode 100644 index 0000000000000..68360a3efcdb4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryCodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.CodeVersion; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; +import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; + +public final class RegistryCodeVersionsImpl implements RegistryCodeVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryCodeVersionsImpl.class); + + private final RegistryCodeVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryCodeVersionsImpl( + RegistryCodeVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, codeName); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, codeName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String codeName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version); + } + + public void delete( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeVersion get(String resourceGroupName, String registryName, String codeName, String version) { + CodeVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, codeName, version); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String codeName, + String version, + PendingUploadRequestDto body, + Context context) { + Response inner = + this + .serviceClient() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, codeName, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { + PendingUploadResponseDtoInner inner = + this + .serviceClient() + .createOrGetStartPendingUpload(resourceGroupName, registryName, codeName, version, body); + if (inner != null) { + return new PendingUploadResponseDtoImpl(inner, this.manager()); + } else { + return null; + } + } + + public CodeVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, codeName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String codeName = Utils.getValueFromIdByName(id, "codes"); + if (codeName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, codeName, version, context); + } + + private RegistryCodeVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CodeVersionImpl define(String name) { + return new CodeVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java new file mode 100644 index 0000000000000..d1f7e611f9ab0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java @@ -0,0 +1,1144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; +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 RegistryComponentContainersClient. */ +public final class RegistryComponentContainersClientImpl implements RegistryComponentContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryComponentContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryComponentContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryComponentContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryComponentContainers to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryComponentContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComponentContainerInner body, + @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); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + } + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, componentName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String componentName) { + return this.beginDeleteAsync(resourceGroupName, registryName, componentName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String componentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, componentName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String componentName) { + return beginDeleteAsync(resourceGroupName, registryName, componentName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String componentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String componentName) { + deleteAsync(resourceGroupName, registryName, componentName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String componentName, Context context) { + deleteAsync(resourceGroupName, registryName, componentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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, + registryName, + componentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String componentName) { + return getWithResponseAsync(resourceGroupName, registryName, componentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { + return getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentContainerInner.class, + ComponentContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentContainerInner.class, + ComponentContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context) + .getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + ComponentContainerInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).block(); + } + + /** + * 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 a paginated list of ComponentContainer entities 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 a paginated list of ComponentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java new file mode 100644 index 0000000000000..120a987a7c4e8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; +import com.azure.resourcemanager.machinelearning.models.ComponentContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentContainers; + +public final class RegistryComponentContainersImpl implements RegistryComponentContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentContainersImpl.class); + + private final RegistryComponentContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryComponentContainersImpl( + RegistryComponentContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, context); + return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String componentName) { + this.serviceClient().delete(resourceGroupName, registryName, componentName); + } + + public void delete(String resourceGroupName, String registryName, String componentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentContainer get(String resourceGroupName, String registryName, String componentName) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public ComponentContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, context); + } + + private RegistryComponentContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ComponentContainerImpl define(String name) { + return new ComponentContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java new file mode 100644 index 0000000000000..8eae8f0a1a742 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java @@ -0,0 +1,1281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; +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 RegistryComponentVersionsClient. */ +public final class RegistryComponentVersionsClientImpl implements RegistryComponentVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryComponentVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryComponentVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryComponentVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryComponentVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryComponentVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComponentVersionInner body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String componentName, String orderBy, Integer top, String skip) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String componentName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String componentName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, componentName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String componentName, String version) { + return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String componentName, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String componentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String componentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, componentName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String componentName, String version) { + deleteAsync(resourceGroupName, registryName, componentName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String componentName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, componentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String componentName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName 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.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String componentName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner get( + String resourceGroupName, String registryName, String componentName, String version) { + return getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + componentName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ComponentVersionInner.class, + ComponentVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String componentName, + String version, + ComponentVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).block(); + } + + /** + * 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 a paginated list of ComponentVersion entities 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 a paginated list of ComponentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java new file mode 100644 index 0000000000000..d1f227a93e3fc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; +import com.azure.resourcemanager.machinelearning.models.ComponentVersion; +import com.azure.resourcemanager.machinelearning.models.RegistryComponentVersions; + +public final class RegistryComponentVersionsImpl implements RegistryComponentVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryComponentVersionsImpl.class); + + private final RegistryComponentVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryComponentVersionsImpl( + RegistryComponentVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String componentName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, componentName); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, componentName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String componentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version); + } + + public void delete( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version) { + ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, componentName, version); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ComponentVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, componentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String componentName = Utils.getValueFromIdByName(id, "components"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, componentName, version, context); + } + + private RegistryComponentVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ComponentVersionImpl define(String name) { + return new ComponentVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java new file mode 100644 index 0000000000000..0fff347f42a76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java @@ -0,0 +1,1125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryDataContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; +import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 RegistryDataContainersClient. */ +public final class RegistryDataContainersClientImpl implements RegistryDataContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryDataContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryDataContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryDataContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryDataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryDataContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryDataContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataContainerInner body, + @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); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + } + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String name) { + return this.beginDeleteAsync(resourceGroupName, registryName, name).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String name, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, name, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String name) { + return beginDeleteAsync(resourceGroupName, registryName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String name) { + deleteAsync(resourceGroupName, registryName, name).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String name, Context context) { + deleteAsync(resourceGroupName, registryName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String name, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String name) { + return getWithResponseAsync(resourceGroupName, registryName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, name, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerInner get(String resourceGroupName, String registryName, String name) { + return getWithResponse(resourceGroupName, registryName, name, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataContainerInner.class, + DataContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DataContainerInner.class, DataContainerInner.class, context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerInner createOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, name, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerInner createOrUpdate( + String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, name, body, context).block(); + } + + /** + * 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 a paginated list of DataContainer entities 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 a paginated list of DataContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java new file mode 100644 index 0000000000000..2de0d01b6ca62 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryDataContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; +import com.azure.resourcemanager.machinelearning.models.DataContainer; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.RegistryDataContainers; + +public final class RegistryDataContainersImpl implements RegistryDataContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryDataContainersImpl.class); + + private final RegistryDataContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryDataContainersImpl( + RegistryDataContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String name) { + this.serviceClient().delete(resourceGroupName, registryName, name); + } + + public void delete(String resourceGroupName, String registryName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, name, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataContainer get(String resourceGroupName, String registryName, String name) { + DataContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, name); + if (inner != null) { + return new DataContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, name, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, name, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + this.delete(resourceGroupName, registryName, name, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + this.delete(resourceGroupName, registryName, name, context); + } + + private RegistryDataContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public DataContainerImpl define(String name) { + return new DataContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java new file mode 100644 index 0000000000000..f551a4b073026 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +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.Post; +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.machinelearning.fluent.RegistryDataReferencesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RegistryDataReferencesClient. */ +public final class RegistryDataReferencesClientImpl implements RegistryDataReferencesClient { + /** The proxy service used to perform REST calls. */ + private final RegistryDataReferencesService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryDataReferencesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryDataReferencesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryDataReferencesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryDataReferences to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryDataReferencesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/datareferences/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBlobReferenceSas( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GetBlobReferenceSasRequestDto body, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBlobReferenceSasWithResponseAsync( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getBlobReferenceSas( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBlobReferenceSasWithResponseAsync( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getBlobReferenceSas( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBlobReferenceSasAsync( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body) { + return getBlobReferenceSasWithResponseAsync(resourceGroupName, registryName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBlobReferenceSasWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body, + Context context) { + return getBlobReferenceSasWithResponseAsync(resourceGroupName, registryName, name, version, body, context) + .block(); + } + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GetBlobReferenceSasResponseDtoInner getBlobReferenceSas( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body) { + return getBlobReferenceSasWithResponse(resourceGroupName, registryName, name, version, body, Context.NONE) + .getValue(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java new file mode 100644 index 0000000000000..0610ac55da3f5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryDataReferencesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasResponseDto; +import com.azure.resourcemanager.machinelearning.models.RegistryDataReferences; + +public final class RegistryDataReferencesImpl implements RegistryDataReferences { + private static final ClientLogger LOGGER = new ClientLogger(RegistryDataReferencesImpl.class); + + private final RegistryDataReferencesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryDataReferencesImpl( + RegistryDataReferencesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getBlobReferenceSasWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body, + Context context) { + Response inner = + this + .serviceClient() + .getBlobReferenceSasWithResponse(resourceGroupName, registryName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new GetBlobReferenceSasResponseDtoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GetBlobReferenceSasResponseDto getBlobReferenceSas( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body) { + GetBlobReferenceSasResponseDtoInner inner = + this.serviceClient().getBlobReferenceSas(resourceGroupName, registryName, name, version, body); + if (inner != null) { + return new GetBlobReferenceSasResponseDtoImpl(inner, this.manager()); + } else { + return null; + } + } + + private RegistryDataReferencesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java new file mode 100644 index 0000000000000..2d97e4789520b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java @@ -0,0 +1,1527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryDataVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +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 RegistryDataVersionsClient. */ +public final class RegistryDataVersionsClientImpl implements RegistryDataVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryDataVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryDataVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryDataVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryDataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryDataVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryDataVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @QueryParam("$tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataVersionBaseInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PendingUploadRequestDto body, + @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); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + tags, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + tags, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType)); + } + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, String version) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String name, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, name, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String name, String version) { + return this.beginDeleteAsync(resourceGroupName, registryName, name, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String name, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, name, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String name, String version) { + return beginDeleteAsync(resourceGroupName, registryName, name, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String name, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, name, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String name, String version) { + deleteAsync(resourceGroupName, registryName, name, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String name, String version, Context context) { + deleteAsync(resourceGroupName, registryName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String name, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String name, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String name, String version) { + return getWithResponseAsync(resourceGroupName, registryName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String name, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, name, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version) { + return getWithResponse(resourceGroupName, registryName, name, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataVersionBaseInner.class, + DataVersionBaseInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DataVersionBaseInner.class, DataVersionBaseInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionBaseInner createOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, name, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionBaseInner createOrUpdate( + String resourceGroupName, + String registryName, + String name, + String version, + DataVersionBaseInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, name, version, body, context).block(); + } + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, + String registryName, + String name, + String version, + PendingUploadRequestDto body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + name, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrGetStartPendingUploadAsync( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + PendingUploadRequestDto body, + Context context) { + return createOrGetStartPendingUploadWithResponseAsync( + resourceGroupName, registryName, name, version, body, context) + .block(); + } + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, name, version, body, Context.NONE) + .getValue(); + } + + /** + * 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 a paginated list of DataVersionBase entities 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 a paginated list of DataVersionBase entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java new file mode 100644 index 0000000000000..51cff7e52b8aa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryDataVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.DataVersionBase; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; +import com.azure.resourcemanager.machinelearning.models.RegistryDataVersions; + +public final class RegistryDataVersionsImpl implements RegistryDataVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryDataVersionsImpl.class); + + private final RegistryDataVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryDataVersionsImpl( + RegistryDataVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, name); + return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context); + return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String name, String version) { + this.serviceClient().delete(resourceGroupName, registryName, name, version); + } + + public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, name, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String name, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, name, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataVersionBaseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataVersionBase get(String resourceGroupName, String registryName, String name, String version) { + DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, registryName, name, version); + if (inner != null) { + return new DataVersionBaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + PendingUploadRequestDto body, + Context context) { + Response inner = + this + .serviceClient() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, name, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { + PendingUploadResponseDtoInner inner = + this.serviceClient().createOrGetStartPendingUpload(resourceGroupName, registryName, name, version, body); + if (inner != null) { + return new PendingUploadResponseDtoImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataVersionBase 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, name, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, name, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, name, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, name, version, context); + } + + private RegistryDataVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public DataVersionBaseImpl define(String name) { + return new DataVersionBaseImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java new file mode 100644 index 0000000000000..baa2dbc332e13 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java @@ -0,0 +1,1165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 RegistryEnvironmentContainersClient. */ +public final class RegistryEnvironmentContainersClientImpl implements RegistryEnvironmentContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryEnvironmentContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryEnvironmentContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryEnvironmentContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryEnvironmentContainersService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryEnvironmentContainers to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryEnvironmentContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EnvironmentContainerInner body, + @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); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + } + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String environmentName) { + return this.beginDeleteAsync(resourceGroupName, registryName, environmentName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String environmentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String environmentName) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String environmentName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String environmentName) { + deleteAsync(resourceGroupName, registryName, environmentName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String environmentName, Context context) { + deleteAsync(resourceGroupName, registryName, environmentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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, + registryName, + environmentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String environmentName) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { + return getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentContainerInner.class, + EnvironmentContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentContainerInner.class, + EnvironmentContainerInner.class, + context); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) + .getSyncPoller(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body).block(); + } + + /** + * Create or update container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + EnvironmentContainerInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).block(); + } + + /** + * 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 a paginated list of EnvironmentContainer entities 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 a paginated list of EnvironmentContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java new file mode 100644 index 0000000000000..5a92713cac223 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryEnvironmentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentContainers; + +public final class RegistryEnvironmentContainersImpl implements RegistryEnvironmentContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentContainersImpl.class); + + private final RegistryEnvironmentContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryEnvironmentContainersImpl( + RegistryEnvironmentContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String environmentName) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, environmentName); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public EnvironmentContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, context); + } + + private RegistryEnvironmentContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EnvironmentContainerImpl define(String name) { + return new EnvironmentContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java new file mode 100644 index 0000000000000..1730500785f11 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java @@ -0,0 +1,1326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 RegistryEnvironmentVersionsClient. */ +public final class RegistryEnvironmentVersionsClientImpl implements RegistryEnvironmentVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryEnvironmentVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryEnvironmentVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryEnvironmentVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create( + RegistryEnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryEnvironmentVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryEnvironmentVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EnvironmentVersionInner body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + this.client.getApiVersion(), + orderBy, + top, + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType) { + return new PagedFlux<>( + () -> + listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> + listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String environmentName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String environmentName, String version) { + return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String environmentName, String version, Context context) { + return this + .beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context) + .getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String environmentName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String environmentName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String environmentName, String version) { + deleteAsync(resourceGroupName, registryName, environmentName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String environmentName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, environmentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String environmentName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName 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.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String environmentName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner get( + String resourceGroupName, String registryName, String environmentName, String version) { + return getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + environmentName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentVersionInner.class, + EnvironmentVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + EnvironmentVersionInner.class, + EnvironmentVersionInner.class, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String environmentName, + String version, + EnvironmentVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).block(); + } + + /** + * 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 a paginated list of EnvironmentVersion entities 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 a paginated list of EnvironmentVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java new file mode 100644 index 0000000000000..81d93bafe1823 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryEnvironmentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.RegistryEnvironmentVersions; + +public final class RegistryEnvironmentVersionsImpl implements RegistryEnvironmentVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryEnvironmentVersionsImpl.class); + + private final RegistryEnvironmentVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryEnvironmentVersionsImpl( + RegistryEnvironmentVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String resourceGroupName, String registryName, String environmentName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, environmentName); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version); + } + + public void delete( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentVersion get( + String resourceGroupName, String registryName, String environmentName, String version) { + EnvironmentVersionInner inner = + this.serviceClient().get(resourceGroupName, registryName, environmentName, version); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public EnvironmentVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, environmentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "environments"); + if (environmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, environmentName, version, context); + } + + private RegistryEnvironmentVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EnvironmentVersionImpl define(String name) { + return new EnvironmentVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java new file mode 100644 index 0000000000000..612b9ae1d3c05 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class RegistryImpl implements Registry, Registry.Definition, Registry.Update { + private RegistryInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String discoveryUrl() { + return this.innerModel().discoveryUrl(); + } + + public String intellectualPropertyPublisher() { + return this.innerModel().intellectualPropertyPublisher(); + } + + public ArmResourceId managedResourceGroup() { + return this.innerModel().managedResourceGroup(); + } + + public String mlFlowRegistryUri() { + return this.innerModel().mlFlowRegistryUri(); + } + + public List registryPrivateEndpointConnections() { + List inner = this.innerModel().registryPrivateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public List regionDetails() { + List inner = this.innerModel().regionDetails(); + 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 RegistryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String registryName; + + private PartialRegistryPartialTrackedResource updateBody; + + public RegistryImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Registry create() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .createOrUpdate(resourceGroupName, registryName, this.innerModel(), Context.NONE); + return this; + } + + public Registry create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .createOrUpdate(resourceGroupName, registryName, this.innerModel(), context); + return this; + } + + RegistryImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RegistryInner(); + this.serviceManager = serviceManager; + this.registryName = name; + } + + public RegistryImpl update() { + this.updateBody = new PartialRegistryPartialTrackedResource(); + return this; + } + + public Registry apply() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .updateWithResponse(resourceGroupName, registryName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public Registry apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .updateWithResponse(resourceGroupName, registryName, updateBody, context) + .getValue(); + return this; + } + + RegistryImpl( + RegistryInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = Utils.getValueFromIdByName(innerObject.id(), "registries"); + } + + public Registry refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE) + .getValue(); + return this; + } + + public Registry refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getRegistries() + .getByResourceGroupWithResponse(resourceGroupName, registryName, context) + .getValue(); + return this; + } + + public Registry removeRegions(RegistryInner body) { + return serviceManager.registries().removeRegions(resourceGroupName, registryName, body); + } + + public Registry removeRegions(RegistryInner body, Context context) { + return serviceManager.registries().removeRegions(resourceGroupName, registryName, body, context); + } + + public RegistryImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public RegistryImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public RegistryImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public RegistryImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public RegistryImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public RegistryImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public RegistryImpl withDiscoveryUrl(String discoveryUrl) { + this.innerModel().withDiscoveryUrl(discoveryUrl); + return this; + } + + public RegistryImpl withIntellectualPropertyPublisher(String intellectualPropertyPublisher) { + this.innerModel().withIntellectualPropertyPublisher(intellectualPropertyPublisher); + return this; + } + + public RegistryImpl withManagedResourceGroup(ArmResourceId managedResourceGroup) { + this.innerModel().withManagedResourceGroup(managedResourceGroup); + return this; + } + + public RegistryImpl withMlFlowRegistryUri(String mlFlowRegistryUri) { + this.innerModel().withMlFlowRegistryUri(mlFlowRegistryUri); + return this; + } + + public RegistryImpl withRegistryPrivateEndpointConnections( + List registryPrivateEndpointConnections) { + this.innerModel().withRegistryPrivateEndpointConnections(registryPrivateEndpointConnections); + return this; + } + + public RegistryImpl withPublicNetworkAccess(String publicNetworkAccess) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + public RegistryImpl withRegionDetails(List regionDetails) { + this.innerModel().withRegionDetails(regionDetails); + return this; + } + + public RegistryImpl withIdentity(RegistryPartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public RegistryImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java new file mode 100644 index 0000000000000..cd48fccc0d855 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java @@ -0,0 +1,1127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; +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 RegistryModelContainersClient. */ +public final class RegistryModelContainersClientImpl implements RegistryModelContainersClient { + /** The proxy service used to perform REST calls. */ + private final RegistryModelContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryModelContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryModelContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryModelContainers to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryModelContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ModelContainerInner body, + @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); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + this.client.getApiVersion(), + skip, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + } + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, modelName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String modelName) { + return this.beginDeleteAsync(resourceGroupName, registryName, modelName).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String modelName, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, modelName, context).getSyncPoller(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String modelName) { + return beginDeleteAsync(resourceGroupName, registryName, modelName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String modelName, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String modelName) { + deleteAsync(resourceGroupName, registryName, modelName).block(); + } + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String modelName, Context context) { + deleteAsync(resourceGroupName, registryName, modelName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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, + registryName, + modelName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String registryName, String modelName) { + return getWithResponseAsync(resourceGroupName, registryName, modelName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, context).block(); + } + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { + return getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ModelContainerInner.class, + ModelContainerInner.class, + this.client.getContext()); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ModelContainerInner.class, ModelContainerInner.class, context); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).getSyncPoller(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).getSyncPoller(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, body).block(); + } + + /** + * Create or update model container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).block(); + } + + /** + * 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 a paginated list of ModelContainer entities 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 a paginated list of ModelContainer entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java new file mode 100644 index 0000000000000..5309a813a8a58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelContainer; +import com.azure.resourcemanager.machinelearning.models.RegistryModelContainers; + +public final class RegistryModelContainersImpl implements RegistryModelContainers { + private static final ClientLogger LOGGER = new ClientLogger(RegistryModelContainersImpl.class); + + private final RegistryModelContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryModelContainersImpl( + RegistryModelContainersClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String modelName) { + this.serviceClient().delete(resourceGroupName, registryName, modelName); + } + + public void delete(String resourceGroupName, String registryName, String modelName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelContainer get(String resourceGroupName, String registryName, String modelName) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public ModelContainer 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, context); + } + + private RegistryModelContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ModelContainerImpl define(String name) { + return new ModelContainerImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java new file mode 100644 index 0000000000000..ef1bde80e0dc2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java @@ -0,0 +1,1622 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.machinelearning.fluent.RegistryModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +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 RegistryModelVersionsClient. */ +public final class RegistryModelVersionsClientImpl implements RegistryModelVersionsClient { + /** The proxy service used to perform REST calls. */ + private final RegistryModelVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of RegistryModelVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RegistryModelVersionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = + RestProxy + .create(RegistryModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesRegistryModelVersions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RegistryModelVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("version") String version, + @QueryParam("description") String description, + @QueryParam("tags") String tags, + @QueryParam("properties") String properties, + @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ModelVersionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PendingUploadRequestDto body, + @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); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + listAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType)); + } + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + return new PagedIterable<>( + listAsync( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context)); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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 + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, String version) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, version); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 registryName, String modelName, String version, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, registryName, modelName, version, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String modelName, String version) { + return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 registryName, String modelName, String version, Context context) { + return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).getSyncPoller(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String modelName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 registryName, String modelName, String version, Context context) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String modelName, String version) { + deleteAsync(resourceGroupName, registryName, modelName, version).block(); + } + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 registryName, String modelName, String version, Context context) { + deleteAsync(resourceGroupName, registryName, modelName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String registryName, String modelName, 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 (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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName 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.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String registryName, String modelName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version, context).block(); + } + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { + return getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ModelVersionInner.class, + ModelVersionInner.class, + this.client.getContext()); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ModelVersionInner.class, ModelVersionInner.class, context); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ModelVersionInner> beginCreateOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) + .getSyncPoller(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner createOrUpdate( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).block(); + } + + /** + * Create or update version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner createOrUpdate( + String resourceGroupName, + String registryName, + String modelName, + String version, + ModelVersionInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).block(); + } + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrGetStartPendingUploadWithResponseAsync( + String resourceGroupName, + String registryName, + String modelName, + String version, + PendingUploadRequestDto body, + 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 (registryName == null) { + return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); + } + if (modelName == null) { + return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrGetStartPendingUpload( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + registryName, + modelName, + version, + this.client.getApiVersion(), + body, + accept, + context); + } + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrGetStartPendingUploadAsync( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, modelName, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String modelName, + String version, + PendingUploadRequestDto body, + Context context) { + return createOrGetStartPendingUploadWithResponseAsync( + resourceGroupName, registryName, modelName, version, body, context) + .block(); + } + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PendingUploadResponseDtoInner createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { + return createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, modelName, version, body, Context.NONE) + .getValue(); + } + + /** + * 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 a paginated list of ModelVersion entities 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 a paginated list of ModelVersion entities 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java new file mode 100644 index 0000000000000..ec732d6bcbb86 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RegistryModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.ModelVersion; +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadResponseDto; +import com.azure.resourcemanager.machinelearning.models.RegistryModelVersions; + +public final class RegistryModelVersionsImpl implements RegistryModelVersions { + private static final ClientLogger LOGGER = new ClientLogger(RegistryModelVersionsImpl.class); + + private final RegistryModelVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RegistryModelVersionsImpl( + RegistryModelVersionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, modelName); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + resourceGroupName, + registryName, + modelName, + skip, + orderBy, + top, + version, + description, + tags, + properties, + listViewType, + context); + return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String registryName, String modelName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version); + } + + public void delete( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version, context); + } + + public Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, version, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelVersion get(String resourceGroupName, String registryName, String modelName, String version) { + ModelVersionInner inner = this.serviceClient().get(resourceGroupName, registryName, modelName, version); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String modelName, + String version, + PendingUploadRequestDto body, + Context context) { + Response inner = + this + .serviceClient() + .createOrGetStartPendingUploadWithResponse( + resourceGroupName, registryName, modelName, version, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { + PendingUploadResponseDtoInner inner = + this + .serviceClient() + .createOrGetStartPendingUpload(resourceGroupName, registryName, modelName, version, body); + if (inner != null) { + return new PendingUploadResponseDtoImpl(inner, this.manager()); + } else { + return null; + } + } + + public ModelVersion 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + return this.getWithResponse(resourceGroupName, registryName, modelName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, version, 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 registryName = Utils.getValueFromIdByName(id, "registries"); + if (registryName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'registries'.", id))); + } + String modelName = Utils.getValueFromIdByName(id, "models"); + if (modelName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + this.delete(resourceGroupName, registryName, modelName, version, context); + } + + private RegistryModelVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ModelVersionImpl define(String name) { + return new ModelVersionImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java index 5b592b442ec78..366d2c3779d1f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java @@ -45,30 +45,29 @@ public final class SchedulesClientImpl implements SchedulesClient { private final SchedulesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of SchedulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - SchedulesClientImpl(AzureMachineLearningWorkspacesImpl client) { + SchedulesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesSchedules to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesSchedules to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface SchedulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -84,8 +83,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -100,8 +98,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -116,8 +113,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java index ec1dff04b47bb..6c487eabab2f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java @@ -36,21 +36,21 @@ public final class UsagesClientImpl implements UsagesClient { private final UsagesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of UsagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { + UsagesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesUsages to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java index 862150234bac0..86b5f7b8640ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java @@ -31,21 +31,21 @@ public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesC private final VirtualMachineSizesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of VirtualMachineSizesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { + VirtualMachineSizesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesVirtualMachineSizes to be used by the + * The interface defining all the services for AzureMachineLearningServicesVirtualMachineSizes to be used by the * proxy service to perform REST calls. */ @Host("{$host}") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java index 2b07717ee35e0..4ce5d081bc428 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java @@ -39,14 +39,14 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection private final WorkspaceConnectionsService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceConnectionsClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy .create(WorkspaceConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -54,7 +54,7 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the + * The interface defining all the services for AzureMachineLearningServicesWorkspaceConnections to be used by the * proxy service to perform REST calls. */ @Host("{$host}") @@ -62,8 +62,7 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection public interface WorkspaceConnectionsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -79,8 +78,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,8 +93,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -111,8 +108,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java index 46e72e570fe95..4cfb7863f6890 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java @@ -36,30 +36,29 @@ public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClien private final WorkspaceFeaturesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceFeaturesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceFeaturesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningServicesWorkspaceFeatures to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface WorkspaceFeaturesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java index 5a2da698968a9..19f9f21b9ed51 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; @@ -17,12 +18,14 @@ import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.Sku; @@ -153,6 +156,10 @@ public List privateEndpointConnections() { } } + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + public List sharedPrivateLinkResources() { List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { @@ -195,6 +202,15 @@ public Boolean v1LegacyMode() { return this.innerModel().v1LegacyMode(); } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -491,6 +507,16 @@ public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAc } } + public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + if (isInCreateMode()) { + this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } else { + this.updateParameters.withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + } + public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; @@ -522,6 +548,11 @@ public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { return this; } + public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.innerModel().withManagedNetwork(managedNetwork); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java index e097ac2af75b8..7e38190c73a35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.machinelearning.implementation; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.WorkspaceProperties; @@ -109,6 +112,10 @@ public List privateEndpointConnections() { } } + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + public List sharedPrivateLinkResources() { List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { @@ -151,6 +158,15 @@ public Boolean v1LegacyMode() { return this.innerModel().v1LegacyMode(); } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + public WorkspacePropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java index 31d06417842a9..e3be9bfe550c8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java @@ -55,21 +55,21 @@ public final class WorkspacesClientImpl implements WorkspacesClient { private final WorkspacesService service; /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspacesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspacesClientImpl(AzureMachineLearningServicesImpl client) { this.service = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy + * The interface defining all the services for AzureMachineLearningServicesWorkspaces to be used by the proxy * service to perform REST calls. */ @Host("{$host}") @@ -77,8 +77,7 @@ public final class WorkspacesClientImpl implements WorkspacesClient { public interface WorkspacesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -92,8 +91,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -108,8 +106,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -118,13 +115,13 @@ Mono>> delete( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("forceToPurge") Boolean forceToPurge, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -139,8 +136,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -154,8 +150,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> diagnose( @@ -170,8 +165,7 @@ Mono>> diagnose( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys( @@ -185,8 +179,7 @@ Mono> listKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resyncKeys( @@ -212,8 +205,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNotebookAccessToken( @@ -227,8 +219,7 @@ Mono> listNotebookAccessToken( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> prepareNotebook( @@ -242,8 +233,7 @@ Mono>> prepareNotebook( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listStorageAccountKeys( @@ -257,8 +247,7 @@ Mono> listStorageAccountKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNotebookKeys( @@ -272,8 +261,7 @@ Mono> listNotebookKeys( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listOutboundNetworkDependenciesEndpoints( @@ -723,13 +711,15 @@ public WorkspaceInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, Boolean forceToPurge) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -760,6 +750,7 @@ private Mono>> deleteWithResponseAsync(String resource this.client.getSubscriptionId(), resourceGroupName, workspaceName, + forceToPurge, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -770,6 +761,7 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -778,7 +770,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -807,10 +799,32 @@ private Mono>> deleteWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + forceToPurge, accept, context); } + /** + * Deletes a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, Boolean forceToPurge) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Deletes a machine learning workspace. * @@ -823,7 +837,8 @@ private Mono>> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); + final Boolean forceToPurge = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); return this .client .getLroResult( @@ -835,6 +850,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -843,9 +859,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, Context context) { + String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge, context); return this .client .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); @@ -863,7 +880,8 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName).getSyncPoller(); + final Boolean forceToPurge = null; + return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).getSyncPoller(); } /** @@ -871,6 +889,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -879,8 +898,26 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).getSyncPoller(); + } + + /** + * Deletes a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge) { + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -895,7 +932,10 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); + final Boolean forceToPurge = null; + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -903,6 +943,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -910,8 +951,9 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context) + private Mono deleteAsync( + String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -927,7 +969,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, C */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); + final Boolean forceToPurge = null; + deleteAsync(resourceGroupName, workspaceName, forceToPurge).block(); } /** @@ -935,14 +978,15 @@ public void delete(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Context context) { - deleteAsync(resourceGroupName, workspaceName, context).block(); + public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + deleteAsync(resourceGroupName, workspaceName, forceToPurge, context).block(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java index 75bd16e0e6576..0648718f0271b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java @@ -66,12 +66,12 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { + public void delete(String resourceGroupName, String workspaceName) { this.serviceClient().delete(resourceGroupName, workspaceName); } - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); + public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, forceToPurge, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -322,10 +322,11 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - this.delete(resourceGroupName, workspaceName, Context.NONE); + Boolean localForceToPurge = null; + this.delete(resourceGroupName, workspaceName, localForceToPurge, Context.NONE); } - public void deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Boolean forceToPurge, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -341,7 +342,7 @@ public void deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - this.delete(resourceGroupName, workspaceName, context); + this.delete(resourceGroupName, workspaceName, forceToPurge, context); } private WorkspacesClient serviceClient() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java index d69c58716f983..4d32798ab03b6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for AzureMachineLearningWorkspaces. These APIs allow end users to operate on + * Package containing the implementations for AzureMachineLearningServices. These APIs allow end users to operate on * Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java index 3a914e9d93088..7b3bc9adeb73e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java @@ -18,7 +18,7 @@ public final class AccountKeyDatastoreCredentials extends DatastoreCredentials { /* * [Required] Storage account secrets. */ - @JsonProperty(value = "secrets", required = true) + @JsonProperty(value = "secrets") private AccountKeyDatastoreSecrets secrets; /** Creates an instance of AccountKeyDatastoreCredentials class. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java new file mode 100644 index 0000000000000..d1a4ad3d3d5cb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of ACR account to be used for the Registry. */ +@Fluent +public final class AcrDetails { + /* + * Details of system created ACR account to be used for the Registry + */ + @JsonProperty(value = "systemCreatedAcrAccount") + private SystemCreatedAcrAccount systemCreatedAcrAccount; + + /* + * Details of user created ACR account to be used for the Registry + */ + @JsonProperty(value = "userCreatedAcrAccount") + private UserCreatedAcrAccount userCreatedAcrAccount; + + /** Creates an instance of AcrDetails class. */ + public AcrDetails() { + } + + /** + * Get the systemCreatedAcrAccount property: Details of system created ACR account to be used for the Registry. + * + * @return the systemCreatedAcrAccount value. + */ + public SystemCreatedAcrAccount systemCreatedAcrAccount() { + return this.systemCreatedAcrAccount; + } + + /** + * Set the systemCreatedAcrAccount property: Details of system created ACR account to be used for the Registry. + * + * @param systemCreatedAcrAccount the systemCreatedAcrAccount value to set. + * @return the AcrDetails object itself. + */ + public AcrDetails withSystemCreatedAcrAccount(SystemCreatedAcrAccount systemCreatedAcrAccount) { + this.systemCreatedAcrAccount = systemCreatedAcrAccount; + return this; + } + + /** + * Get the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. + * + * @return the userCreatedAcrAccount value. + */ + public UserCreatedAcrAccount userCreatedAcrAccount() { + return this.userCreatedAcrAccount; + } + + /** + * Set the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. + * + * @param userCreatedAcrAccount the userCreatedAcrAccount value to set. + * @return the AcrDetails object itself. + */ + public AcrDetails withUserCreatedAcrAccount(UserCreatedAcrAccount userCreatedAcrAccount) { + this.userCreatedAcrAccount = userCreatedAcrAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (systemCreatedAcrAccount() != null) { + systemCreatedAcrAccount().validate(); + } + if (userCreatedAcrAccount() != null) { + userCreatedAcrAccount().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java new file mode 100644 index 0000000000000..58b661473ae4d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java new file mode 100644 index 0000000000000..c2548fae0435c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The AllFeatures model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "filterType") +@JsonTypeName("AllFeatures") +@Immutable +public final class AllFeatures extends MonitoringFeatureFilterBase { + /** Creates an instance of AllFeatures class. */ + public AllFeatures() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java new file mode 100644 index 0000000000000..cf9fcd13eceff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** All nodes means the service will be running on all of the nodes of the job. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "nodesValueType") +@JsonTypeName("All") +@Immutable +public final class AllNodes extends Nodes { + /** Creates an instance of AllNodes class. */ + public AllNodes() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.java deleted file mode 100644 index 89261a24cb42c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; - -/** An immutable client-side representation of AmlOperation. */ -public interface AmlOperation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Display name of operation. - * - * @return the display value. - */ - AmlOperationDisplay display(); - - /** - * Gets the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner object. - * - * @return the inner object. - */ - AmlOperationInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java deleted file mode 100644 index 2bf229e370c1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java +++ /dev/null @@ -1,128 +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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Display name of operation. */ -@Fluent -public final class AmlOperationDisplay { - /* - * The resource provider name: Microsoft.MachineLearningExperimentation - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * The resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * The operation that users can perform. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * The description for the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** Creates an instance of AmlOperationDisplay class. */ - public AmlOperationDisplay() { - } - - /** - * Get the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @param provider the provider value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: The resource on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The resource on which the operation is performed. - * - * @param resource the resource value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: The operation that users can perform. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: The operation that users can perform. - * - * @param operation the operation value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: The description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description for the operation. - * - * @param description the description value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java deleted file mode 100644 index 49d6cbce0d995..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java +++ /dev/null @@ -1,55 +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.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An array of operations supported by the resource provider. */ -@Fluent -public final class AmlOperationListResult { - /* - * List of AML workspace operations supported by the AML workspace resource provider. - */ - @JsonProperty(value = "value") - private List value; - - /** Creates an instance of AmlOperationListResult class. */ - public AmlOperationListResult() { - } - - /** - * Get the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @param value the value value to set. - * @return the AmlOperationListResult object itself. - */ - public AmlOperationListResult 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) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java new file mode 100644 index 0000000000000..79053ffae7045 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** AML token compute identity definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeIdentityType") +@JsonTypeName("AmlToken") +@Immutable +public final class AmlTokenComputeIdentity extends MonitorComputeIdentityBase { + /** Creates an instance of AmlTokenComputeIdentity class. */ + public AmlTokenComputeIdentity() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java new file mode 100644 index 0000000000000..047608b2e6275 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Access credential with no credentials. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialType") +@JsonTypeName("NoCredentials") +@Immutable +public final class AnonymousAccessCredential extends DataReferenceCredential { + /** Creates an instance of AnonymousAccessCredential class. */ + public AnonymousAccessCredential() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java new file mode 100644 index 0000000000000..50e0ba5cedbfe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ARM ResourceId of a resource. */ +@Fluent +public final class ArmResourceId { + /* + * Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** Creates an instance of ArmResourceId class. */ + public ArmResourceId() { + } + + /** + * Get the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}". + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Arm ResourceId is in the format + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + * or + * "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}". + * + * @param resourceId the resourceId value to set. + * @return the ArmResourceId object itself. + */ + public ArmResourceId withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java new file mode 100644 index 0000000000000..b4358f12b3a5a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of registry asset. */ +public final class AssetProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for AssetProvisioningState. */ + public static final AssetProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for AssetProvisioningState. */ + public static final AssetProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for AssetProvisioningState. */ + public static final AssetProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for AssetProvisioningState. */ + public static final AssetProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for AssetProvisioningState. */ + public static final AssetProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for AssetProvisioningState. */ + public static final AssetProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of AssetProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AssetProvisioningState() { + } + + /** + * Creates or finds a AssetProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AssetProvisioningState. + */ + @JsonCreator + public static AssetProvisioningState fromString(String name) { + return fromString(name, AssetProvisioningState.class); + } + + /** + * Gets known AssetProvisioningState values. + * + * @return known AssetProvisioningState values. + */ + public static Collection values() { + return values(AssetProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java index a9118767dc85a..f8c0b0c6e50d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java @@ -42,6 +42,12 @@ public final class AutoMLJob extends JobBaseProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map outputs; + /* + * Queue settings for the job + */ + @JsonProperty(value = "queueSettings") + private QueueSettings queueSettings; + /* * Compute Resource configuration for the job. */ @@ -122,6 +128,26 @@ public AutoMLJob withOutputs(Map outputs) { return this; } + /** + * Get the queueSettings property: Queue settings for the job. + * + * @return the queueSettings value. + */ + public QueueSettings queueSettings() { + return this.queueSettings; + } + + /** + * Set the queueSettings property: Queue settings for the job. + * + * @param queueSettings the queueSettings value to set. + * @return the AutoMLJob object itself. + */ + public AutoMLJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + /** * Get the resources property: Compute Resource configuration for the job. * @@ -250,6 +276,9 @@ public void validate() { } }); } + if (queueSettings() != null) { + queueSettings().validate(); + } if (resources() != null) { resources().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java index 24e0474c29dd5..183797f808304 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java @@ -45,6 +45,18 @@ public final class AzureBlobDatastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** Creates an instance of AzureBlobDatastore class. */ public AzureBlobDatastore() { } @@ -152,6 +164,46 @@ public AzureBlobDatastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureBlobDatastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java index f2512a5a47e5b..76d00b8b12d0c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java @@ -28,6 +28,18 @@ public final class AzureDataLakeGen1Datastore extends DatastoreProperties { @JsonProperty(value = "storeName", required = true) private String storeName; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** Creates an instance of AzureDataLakeGen1Datastore class. */ public AzureDataLakeGen1Datastore() { } @@ -75,6 +87,46 @@ public AzureDataLakeGen1Datastore withStoreName(String storeName) { return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDataLakeGen1Datastore object itself. + */ + public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDataLakeGen1Datastore object itself. + */ + public AzureDataLakeGen1Datastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java index 11fa5841c6ae6..161847280db84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java @@ -46,6 +46,18 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** Creates an instance of AzureDataLakeGen2Datastore class. */ public AzureDataLakeGen2Datastore() { } @@ -153,6 +165,46 @@ public AzureDataLakeGen2Datastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureDataLakeGen2Datastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java new file mode 100644 index 0000000000000..5fa79bf3bdb06 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Base definition for Azure datastore contents configuration. */ +@Fluent +public class AzureDatastore { + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** Creates an instance of AzureDatastore class. */ + public AzureDatastore() { + } + + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureDatastore object itself. + */ + public AzureDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDatastore object itself. + */ + public AzureDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java new file mode 100644 index 0000000000000..0f12557830150 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Webhook details specific for Azure DevOps. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "webhookType") +@JsonTypeName("AzureDevOps") +@Fluent +public final class AzureDevOpsWebhook extends Webhook { + /** Creates an instance of AzureDevOpsWebhook class. */ + public AzureDevOpsWebhook() { + } + + /** {@inheritDoc} */ + @Override + public AzureDevOpsWebhook withEventType(String eventType) { + super.withEventType(eventType); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java index af3f62739d13d..96e5e7f2681b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java @@ -46,6 +46,18 @@ public final class AzureFileDatastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + /* + * Azure Resource Group name + */ + @JsonProperty(value = "resourceGroup") + private String resourceGroup; + + /* + * Azure Subscription Id + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + /** Creates an instance of AzureFileDatastore class. */ public AzureFileDatastore() { } @@ -153,6 +165,46 @@ public AzureFileDatastore withServiceDataAccessAuthIdentity( return this; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** {@inheritDoc} */ @Override public AzureFileDatastore withCredentials(DatastoreCredentials credentials) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java index ff78009e7cdf7..487f495eac097 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java @@ -119,11 +119,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The BatchDeployment definition stages. */ interface DefinitionStages { /** The first stage of the BatchDeployment definition. */ interface Blank extends WithLocation { } + /** The stage of the BatchDeployment definition allowing to specify location. */ interface WithLocation { /** @@ -142,6 +144,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the BatchDeployment definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -155,6 +158,7 @@ interface WithParentResource { WithProperties withExistingBatchEndpoint( String resourceGroupName, String workspaceName, String endpointName); } + /** The stage of the BatchDeployment definition allowing to specify properties. */ interface WithProperties { /** @@ -165,6 +169,7 @@ interface WithProperties { */ WithCreate withProperties(BatchDeploymentProperties properties); } + /** * The stage of the BatchDeployment 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. @@ -189,6 +194,7 @@ interface WithCreate */ BatchDeployment create(Context context); } + /** The stage of the BatchDeployment definition allowing to specify tags. */ interface WithTags { /** @@ -199,6 +205,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the BatchDeployment definition allowing to specify identity. */ interface WithIdentity { /** @@ -210,6 +217,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the BatchDeployment definition allowing to specify kind. */ interface WithKind { /** @@ -222,6 +230,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the BatchDeployment definition allowing to specify sku. */ interface WithSku { /** @@ -233,6 +242,7 @@ interface WithSku { WithCreate withSku(Sku sku); } } + /** * Begins update for the BatchDeployment resource. * @@ -257,6 +267,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { */ BatchDeployment apply(Context context); } + /** The BatchDeployment update stages. */ interface UpdateStages { /** The stage of the BatchDeployment update allowing to specify tags. */ @@ -269,6 +280,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the BatchDeployment update allowing to specify properties. */ interface WithProperties { /** @@ -280,6 +292,7 @@ interface WithProperties { Update withProperties(PartialBatchDeployment properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java index 00170d2cfd23d..8984c14d42c02 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java @@ -120,11 +120,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The BatchEndpoint definition stages. */ interface DefinitionStages { /** The first stage of the BatchEndpoint definition. */ interface Blank extends WithLocation { } + /** The stage of the BatchEndpoint definition allowing to specify location. */ interface WithLocation { /** @@ -143,6 +145,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the BatchEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -154,6 +157,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the BatchEndpoint definition allowing to specify properties. */ interface WithProperties { /** @@ -164,6 +168,7 @@ interface WithProperties { */ WithCreate withProperties(BatchEndpointProperties properties); } + /** * The stage of the BatchEndpoint 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. @@ -188,6 +193,7 @@ interface WithCreate */ BatchEndpoint create(Context context); } + /** The stage of the BatchEndpoint definition allowing to specify tags. */ interface WithTags { /** @@ -198,6 +204,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the BatchEndpoint definition allowing to specify identity. */ interface WithIdentity { /** @@ -209,6 +216,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the BatchEndpoint definition allowing to specify kind. */ interface WithKind { /** @@ -221,6 +229,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the BatchEndpoint definition allowing to specify sku. */ interface WithSku { /** @@ -232,6 +241,7 @@ interface WithSku { WithCreate withSku(Sku sku); } } + /** * Begins update for the BatchEndpoint resource. * @@ -256,6 +266,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { */ BatchEndpoint apply(Context context); } + /** The BatchEndpoint update stages. */ interface UpdateStages { /** The stage of the BatchEndpoint update allowing to specify tags. */ @@ -268,6 +279,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the BatchEndpoint update allowing to specify identity. */ interface WithIdentity { /** @@ -280,6 +292,7 @@ interface WithIdentity { Update withIdentity(PartialManagedServiceIdentity identity); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java new file mode 100644 index 0000000000000..ab08ea9d0bd64 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the bind options for the container. */ +@Fluent +public final class BindOptions { + /* + * Type of Bind Option + */ + @JsonProperty(value = "propagation") + private String propagation; + + /* + * Indicate whether to create host path. + */ + @JsonProperty(value = "createHostPath") + private Boolean createHostPath; + + /* + * Mention the selinux options. + */ + @JsonProperty(value = "selinux") + private String selinux; + + /** Creates an instance of BindOptions class. */ + public BindOptions() { + } + + /** + * Get the propagation property: Type of Bind Option. + * + * @return the propagation value. + */ + public String propagation() { + return this.propagation; + } + + /** + * Set the propagation property: Type of Bind Option. + * + * @param propagation the propagation value to set. + * @return the BindOptions object itself. + */ + public BindOptions withPropagation(String propagation) { + this.propagation = propagation; + return this; + } + + /** + * Get the createHostPath property: Indicate whether to create host path. + * + * @return the createHostPath value. + */ + public Boolean createHostPath() { + return this.createHostPath; + } + + /** + * Set the createHostPath property: Indicate whether to create host path. + * + * @param createHostPath the createHostPath value to set. + * @return the BindOptions object itself. + */ + public BindOptions withCreateHostPath(Boolean createHostPath) { + this.createHostPath = createHostPath; + return this; + } + + /** + * Get the selinux property: Mention the selinux options. + * + * @return the selinux value. + */ + public String selinux() { + return this.selinux; + } + + /** + * Set the selinux property: Mention the selinux options. + * + * @param selinux the selinux value to set. + * @return the BindOptions object itself. + */ + public BindOptions withSelinux(String selinux) { + this.selinux = selinux; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java new file mode 100644 index 0000000000000..d3212ccdf7469 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The BlobReferenceForConsumptionDto model. */ +@Fluent +public final class BlobReferenceForConsumptionDto { + /* + * Blob URI path for client to upload data. + * Example: https://blob.windows.core.net/Container/Path + */ + @JsonProperty(value = "blobUri") + private String blobUri; + + /* + * Credential info to access storage account + */ + @JsonProperty(value = "credential") + private PendingUploadCredentialDto credential; + + /* + * Arm ID of the storage account to use + */ + @JsonProperty(value = "storageAccountArmId") + private String storageAccountArmId; + + /** Creates an instance of BlobReferenceForConsumptionDto class. */ + public BlobReferenceForConsumptionDto() { + } + + /** + * Get the blobUri property: Blob URI path for client to upload data. Example: + * https://blob.windows.core.net/Container/Path. + * + * @return the blobUri value. + */ + public String blobUri() { + return this.blobUri; + } + + /** + * Set the blobUri property: Blob URI path for client to upload data. Example: + * https://blob.windows.core.net/Container/Path. + * + * @param blobUri the blobUri value to set. + * @return the BlobReferenceForConsumptionDto object itself. + */ + public BlobReferenceForConsumptionDto withBlobUri(String blobUri) { + this.blobUri = blobUri; + return this; + } + + /** + * Get the credential property: Credential info to access storage account. + * + * @return the credential value. + */ + public PendingUploadCredentialDto credential() { + return this.credential; + } + + /** + * Set the credential property: Credential info to access storage account. + * + * @param credential the credential value to set. + * @return the BlobReferenceForConsumptionDto object itself. + */ + public BlobReferenceForConsumptionDto withCredential(PendingUploadCredentialDto credential) { + this.credential = credential; + return this; + } + + /** + * Get the storageAccountArmId property: Arm ID of the storage account to use. + * + * @return the storageAccountArmId value. + */ + public String storageAccountArmId() { + return this.storageAccountArmId; + } + + /** + * Set the storageAccountArmId property: Arm ID of the storage account to use. + * + * @param storageAccountArmId the storageAccountArmId value to set. + * @return the BlobReferenceForConsumptionDto object itself. + */ + public BlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { + this.storageAccountArmId = storageAccountArmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (credential() != null) { + credential().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java new file mode 100644 index 0000000000000..0b6f18dfc3975 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CategoricalDataDriftMetric. */ +public final class CategoricalDataDriftMetric extends ExpandableStringEnum { + /** Static value JensenShannonDistance for CategoricalDataDriftMetric. */ + public static final CategoricalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); + + /** Static value PopulationStabilityIndex for CategoricalDataDriftMetric. */ + public static final CategoricalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); + + /** Static value PearsonsChiSquaredTest for CategoricalDataDriftMetric. */ + public static final CategoricalDataDriftMetric PEARSONS_CHI_SQUARED_TEST = fromString("PearsonsChiSquaredTest"); + + /** + * Creates a new instance of CategoricalDataDriftMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CategoricalDataDriftMetric() { + } + + /** + * Creates or finds a CategoricalDataDriftMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding CategoricalDataDriftMetric. + */ + @JsonCreator + public static CategoricalDataDriftMetric fromString(String name) { + return fromString(name, CategoricalDataDriftMetric.class); + } + + /** + * Gets known CategoricalDataDriftMetric values. + * + * @return known CategoricalDataDriftMetric values. + */ + public static Collection values() { + return values(CategoricalDataDriftMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java new file mode 100644 index 0000000000000..ecb244af56649 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CategoricalDataDriftMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Categorical") +@Fluent +public final class CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + /* + * [Required] The categorical data drift metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private CategoricalDataDriftMetric metric; + + /** Creates an instance of CategoricalDataDriftMetricThreshold class. */ + public CategoricalDataDriftMetricThreshold() { + } + + /** + * Get the metric property: [Required] The categorical data drift metric to calculate. + * + * @return the metric value. + */ + public CategoricalDataDriftMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The categorical data drift metric to calculate. + * + * @param metric the metric value to set. + * @return the CategoricalDataDriftMetricThreshold object itself. + */ + public CategoricalDataDriftMetricThreshold withMetric(CategoricalDataDriftMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public CategoricalDataDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model CategoricalDataDriftMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataDriftMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java new file mode 100644 index 0000000000000..ef97928b23496 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CategoricalDataQualityMetric. */ +public final class CategoricalDataQualityMetric extends ExpandableStringEnum { + /** Static value NullValueRate for CategoricalDataQualityMetric. */ + public static final CategoricalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); + + /** Static value DataTypeErrorRate for CategoricalDataQualityMetric. */ + public static final CategoricalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); + + /** Static value OutOfBoundsRate for CategoricalDataQualityMetric. */ + public static final CategoricalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); + + /** + * Creates a new instance of CategoricalDataQualityMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CategoricalDataQualityMetric() { + } + + /** + * Creates or finds a CategoricalDataQualityMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding CategoricalDataQualityMetric. + */ + @JsonCreator + public static CategoricalDataQualityMetric fromString(String name) { + return fromString(name, CategoricalDataQualityMetric.class); + } + + /** + * Gets known CategoricalDataQualityMetric values. + * + * @return known CategoricalDataQualityMetric values. + */ + public static Collection values() { + return values(CategoricalDataQualityMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java new file mode 100644 index 0000000000000..9eea95d698906 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CategoricalDataQualityMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Categorical") +@Fluent +public final class CategoricalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { + /* + * [Required] The categorical data quality metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private CategoricalDataQualityMetric metric; + + /** Creates an instance of CategoricalDataQualityMetricThreshold class. */ + public CategoricalDataQualityMetricThreshold() { + } + + /** + * Get the metric property: [Required] The categorical data quality metric to calculate. + * + * @return the metric value. + */ + public CategoricalDataQualityMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The categorical data quality metric to calculate. + * + * @param metric the metric value to set. + * @return the CategoricalDataQualityMetricThreshold object itself. + */ + public CategoricalDataQualityMetricThreshold withMetric(CategoricalDataQualityMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public CategoricalDataQualityMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model CategoricalDataQualityMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataQualityMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java new file mode 100644 index 0000000000000..c9c3c52d73d35 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CategoricalPredictionDriftMetric. */ +public final class CategoricalPredictionDriftMetric extends ExpandableStringEnum { + /** Static value JensenShannonDistance for CategoricalPredictionDriftMetric. */ + public static final CategoricalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); + + /** Static value PopulationStabilityIndex for CategoricalPredictionDriftMetric. */ + public static final CategoricalPredictionDriftMetric POPULATION_STABILITY_INDEX = + fromString("PopulationStabilityIndex"); + + /** Static value PearsonsChiSquaredTest for CategoricalPredictionDriftMetric. */ + public static final CategoricalPredictionDriftMetric PEARSONS_CHI_SQUARED_TEST = + fromString("PearsonsChiSquaredTest"); + + /** + * Creates a new instance of CategoricalPredictionDriftMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CategoricalPredictionDriftMetric() { + } + + /** + * Creates or finds a CategoricalPredictionDriftMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding CategoricalPredictionDriftMetric. + */ + @JsonCreator + public static CategoricalPredictionDriftMetric fromString(String name) { + return fromString(name, CategoricalPredictionDriftMetric.class); + } + + /** + * Gets known CategoricalPredictionDriftMetric values. + * + * @return known CategoricalPredictionDriftMetric values. + */ + public static Collection values() { + return values(CategoricalPredictionDriftMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java new file mode 100644 index 0000000000000..f99616b75d0dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CategoricalPredictionDriftMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Categorical") +@Fluent +public final class CategoricalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { + /* + * [Required] The categorical prediction drift metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private CategoricalPredictionDriftMetric metric; + + /** Creates an instance of CategoricalPredictionDriftMetricThreshold class. */ + public CategoricalPredictionDriftMetricThreshold() { + } + + /** + * Get the metric property: [Required] The categorical prediction drift metric to calculate. + * + * @return the metric value. + */ + public CategoricalPredictionDriftMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The categorical prediction drift metric to calculate. + * + * @param metric the metric value to set. + * @return the CategoricalPredictionDriftMetricThreshold object itself. + */ + public CategoricalPredictionDriftMetricThreshold withMetric(CategoricalPredictionDriftMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public CategoricalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model CategoricalPredictionDriftMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CategoricalPredictionDriftMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java index 028afea8b9672..b6f7b1f472744 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java @@ -37,7 +37,7 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials /* * [Required] Service principal secrets. */ - @JsonProperty(value = "secrets", required = true) + @JsonProperty(value = "secrets") private CertificateDatastoreSecrets secrets; /* diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java index 3d41404e0fc47..95684db71a655 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java @@ -66,22 +66,25 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The CodeContainer definition stages. */ interface DefinitionStages { /** The first stage of the CodeContainer definition. */ interface Blank extends WithParentResource { } + /** The stage of the CodeContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } + /** The stage of the CodeContainer definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(CodeContainerProperties properties); } + /** * The stage of the CodeContainer 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. @@ -113,6 +117,7 @@ interface WithCreate { CodeContainer create(Context context); } } + /** * Begins update for the CodeContainer resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ CodeContainer apply(Context context); } + /** The CodeContainer update stages. */ interface UpdateStages { /** The stage of the CodeContainer update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(CodeContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java index 9f59aab192f14..99fb7112a2c90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java @@ -5,15 +5,31 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Container for code asset versions. */ @Fluent public final class CodeContainerProperties extends AssetContainer { + /* + * Provisioning state for the code container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of CodeContainerProperties class. */ public CodeContainerProperties() { } + /** + * Get the provisioningState property: Provisioning state for the code container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public CodeContainerProperties withIsArchived(Boolean isArchived) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java index ed9bae7d57a0e..c7e8f7eedd4b1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; /** Resource collection API of CodeContainers. */ public interface CodeContainers { @@ -91,55 +92,32 @@ Response getWithResponse( CodeContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get container. - * - * @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 container along with {@link Response}. - */ - CodeContainer getById(String id); - - /** - * Get container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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 azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeContainer resource. - * - * @param name resource name. - * @return the first stage of the new CodeContainer definition. + * @return azure Resource Manager resource envelope. */ - CodeContainer.DefinitionStages.Blank define(String name); + CodeContainer createOrUpdate(String resourceGroupName, String workspaceName, String name, CodeContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java index 74b92c620c7c1..179bf300896fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; @@ -66,23 +67,26 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The CodeVersion definition stages. */ interface DefinitionStages { /** The first stage of the CodeVersion definition. */ interface Blank extends WithParentResource { } + /** The stage of the CodeVersion definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, codeName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. * @return the next definition stage. */ - WithProperties withExistingCode(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingCode(String resourceGroupName, String registryName, String codeName); } + /** The stage of the CodeVersion definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +97,7 @@ interface WithProperties { */ WithCreate withProperties(CodeVersionProperties properties); } + /** * The stage of the CodeVersion 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. @@ -114,6 +119,7 @@ interface WithCreate { CodeVersion create(Context context); } } + /** * Begins update for the CodeVersion resource. * @@ -138,6 +144,7 @@ interface Update extends UpdateStages.WithProperties { */ CodeVersion apply(Context context); } + /** The CodeVersion update stages. */ interface UpdateStages { /** The stage of the CodeVersion update allowing to specify properties. */ @@ -151,6 +158,7 @@ interface WithProperties { Update withProperties(CodeVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. * @@ -165,4 +173,28 @@ interface WithProperties { * @return the refreshed resource. */ CodeVersion refresh(Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java index aa9586a3dcee5..720f29ba13693 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java @@ -17,6 +17,12 @@ public final class CodeVersionProperties extends AssetBase { @JsonProperty(value = "codeUri") private String codeUri; + /* + * Provisioning state for the code version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of CodeVersionProperties class. */ public CodeVersionProperties() { } @@ -41,6 +47,15 @@ public CodeVersionProperties withCodeUri(String codeUri) { return this; } + /** + * Get the provisioningState property: Provisioning state for the code version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java index 832a78bf6085d..08875032f1a94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; /** Resource collection API of CodeVersions. */ public interface CodeVersions { @@ -32,6 +33,8 @@ public interface CodeVersions { * @param orderBy Ordering of list. * @param top Maximum number of records to return. * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,6 +48,8 @@ PagedIterable list( String orderBy, Integer top, String skip, + String hash, + String hashVersion, Context context); /** @@ -107,55 +112,113 @@ Response getWithResponse( CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - CodeVersion getById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + CodeVersionInner body, + Context context); /** - * Get version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope. */ - Response getByIdWithResponse(String id, Context context); + CodeVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. */ - Response deleteByIdWithResponse(String id, Context context); + void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + PendingUploadRequestDto body, + Context context); /** - * Begins definition for a new CodeVersion resource. + * Generate a storage location and credential for the client to upload a code asset to. * - * @param name resource name. - * @return the first stage of the new CodeVersion definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - CodeVersion.DefinitionStages.Blank define(String name); + PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java index f7f423aed984f..68c1df41ed816 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java @@ -74,6 +74,12 @@ public final class CommandJob extends JobBaseProperties { @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private Object parameters; + /* + * Queue settings for the job + */ + @JsonProperty(value = "queueSettings") + private QueueSettings queueSettings; + /* * Compute Resource configuration for the job. */ @@ -255,6 +261,26 @@ public Object parameters() { return this.parameters; } + /** + * Get the queueSettings property: Queue settings for the job. + * + * @return the queueSettings value. + */ + public QueueSettings queueSettings() { + return this.queueSettings; + } + + /** + * Set the queueSettings property: Queue settings for the job. + * + * @param queueSettings the queueSettings value to set. + * @return the CommandJob object itself. + */ + public CommandJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + /** * Get the resources property: Compute Resource configuration for the job. * @@ -389,6 +415,9 @@ public void validate() { } }); } + if (queueSettings() != null) { + queueSettings().validate(); + } if (resources() != null) { resources().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java index 2db458e03fb13..3a2de56f97d3d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java @@ -66,22 +66,25 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The ComponentContainer definition stages. */ interface DefinitionStages { /** The first stage of the ComponentContainer definition. */ interface Blank extends WithParentResource { } + /** The stage of the ComponentContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } + /** The stage of the ComponentContainer definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(ComponentContainerProperties properties); } + /** * The stage of the ComponentContainer 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. @@ -113,6 +117,7 @@ interface WithCreate { ComponentContainer create(Context context); } } + /** * Begins update for the ComponentContainer resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ ComponentContainer apply(Context context); } + /** The ComponentContainer update stages. */ interface UpdateStages { /** The stage of the ComponentContainer update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(ComponentContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java index 514b48b0968f2..951a246c2ccda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** @@ -13,10 +14,25 @@ */ @Fluent public final class ComponentContainerProperties extends AssetContainer { + /* + * Provisioning state for the component container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of ComponentContainerProperties class. */ public ComponentContainerProperties() { } + /** + * Get the provisioningState property: Provisioning state for the component container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public ComponentContainerProperties withIsArchived(Boolean isArchived) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java index 4339a456fddc1..a7ac6a798ab35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; /** Resource collection API of ComponentContainers. */ public interface ComponentContainers { @@ -93,55 +94,33 @@ Response getWithResponse( ComponentContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get container. - * - * @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 container along with {@link Response}. - */ - ComponentContainer getById(String id); - - /** - * Get container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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 azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentContainer resource. - * - * @param name resource name. - * @return the first stage of the new ComponentContainer definition. + * @return azure Resource Manager resource envelope. */ - ComponentContainer.DefinitionStages.Blank define(String name); + ComponentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java index 3b45a1f1eb5e9..b0f79fc8e0b17 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java @@ -66,23 +66,26 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The ComponentVersion definition stages. */ interface DefinitionStages { /** The first stage of the ComponentVersion definition. */ interface Blank extends WithParentResource { } + /** The stage of the ComponentVersion definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, componentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. * @return the next definition stage. */ - WithProperties withExistingComponent(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingComponent(String resourceGroupName, String registryName, String componentName); } + /** The stage of the ComponentVersion definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +96,7 @@ interface WithProperties { */ WithCreate withProperties(ComponentVersionProperties properties); } + /** * The stage of the ComponentVersion 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. @@ -114,6 +118,7 @@ interface WithCreate { ComponentVersion create(Context context); } } + /** * Begins update for the ComponentVersion resource. * @@ -138,6 +143,7 @@ interface Update extends UpdateStages.WithProperties { */ ComponentVersion apply(Context context); } + /** The ComponentVersion update stages. */ interface UpdateStages { /** The stage of the ComponentVersion update allowing to specify properties. */ @@ -151,6 +157,7 @@ interface WithProperties { Update withProperties(ComponentVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java index 0dde26bb4437f..387788d0b2b56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java @@ -18,6 +18,12 @@ public final class ComponentVersionProperties extends AssetBase { @JsonProperty(value = "componentSpec") private Object componentSpec; + /* + * Provisioning state for the component version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of ComponentVersionProperties class. */ public ComponentVersionProperties() { } @@ -44,6 +50,15 @@ public ComponentVersionProperties withComponentSpec(Object componentSpec) { return this; } + /** + * Get the provisioningState property: Provisioning state for the component version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java index ee49889d97588..085acda247f0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; /** Resource collection API of ComponentVersions. */ public interface ComponentVersions { @@ -109,55 +110,75 @@ Response getWithResponse( ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - ComponentVersion getById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ComponentVersionInner body, + Context context); /** - * Get version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope. */ - Response getByIdWithResponse(String id, Context context); + ComponentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentVersion resource. - * - * @param name resource name. - * @return the first stage of the new ComponentVersion definition. */ - ComponentVersion.DefinitionStages.Blank define(String name); + void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java index c5332ebf01e8b..92c35ca8b3b2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java @@ -40,6 +40,18 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "sshSettings") private ComputeInstanceSshSettings sshSettings; + /* + * List of Custom Services added to the compute. + */ + @JsonProperty(value = "customServices") + private List customServices; + + /* + * Returns metadata about the operating system image for this compute instance. + */ + @JsonProperty(value = "osImageMetadata", access = JsonProperty.Access.WRITE_ONLY) + private ImageMetadata osImageMetadata; + /* * Describes all connectivity endpoints available for this ComputeInstance. */ @@ -101,7 +113,7 @@ public final class ComputeInstanceProperties { /* * The list of schedules to be applied on the computes. */ - @JsonProperty(value = "schedules", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "schedules") private ComputeSchedules schedules; /* @@ -230,6 +242,35 @@ public ComputeInstanceProperties withSshSettings(ComputeInstanceSshSettings sshS return this; } + /** + * Get the customServices property: List of Custom Services added to the compute. + * + * @return the customServices value. + */ + public List customServices() { + return this.customServices; + } + + /** + * Set the customServices property: List of Custom Services added to the compute. + * + * @param customServices the customServices value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withCustomServices(List customServices) { + this.customServices = customServices; + return this; + } + + /** + * Get the osImageMetadata property: Returns metadata about the operating system image for this compute instance. + * + * @return the osImageMetadata value. + */ + public ImageMetadata osImageMetadata() { + return this.osImageMetadata; + } + /** * Get the connectivityEndpoints property: Describes all connectivity endpoints available for this ComputeInstance. * @@ -361,6 +402,17 @@ public ComputeSchedules schedules() { return this.schedules; } + /** + * Set the schedules property: The list of schedules to be applied on the computes. + * + * @param schedules the schedules value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withSchedules(ComputeSchedules schedules) { + this.schedules = schedules; + return this; + } + /** * Get the enableNodePublicIp property: Enable node public IP. * @@ -437,6 +489,12 @@ public void validate() { if (sshSettings() != null) { sshSettings().validate(); } + if (customServices() != null) { + customServices().forEach(e -> e.validate()); + } + if (osImageMetadata() != null) { + osImageMetadata().validate(); + } if (connectivityEndpoints() != null) { connectivityEndpoints().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java new file mode 100644 index 0000000000000..e6518e0f4db30 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to describe the frequency of a compute recurrence schedule. */ +public final class ComputeRecurrenceFrequency extends ExpandableStringEnum { + /** Static value Minute for ComputeRecurrenceFrequency. */ + public static final ComputeRecurrenceFrequency MINUTE = fromString("Minute"); + + /** Static value Hour for ComputeRecurrenceFrequency. */ + public static final ComputeRecurrenceFrequency HOUR = fromString("Hour"); + + /** Static value Day for ComputeRecurrenceFrequency. */ + public static final ComputeRecurrenceFrequency DAY = fromString("Day"); + + /** Static value Week for ComputeRecurrenceFrequency. */ + public static final ComputeRecurrenceFrequency WEEK = fromString("Week"); + + /** Static value Month for ComputeRecurrenceFrequency. */ + public static final ComputeRecurrenceFrequency MONTH = fromString("Month"); + + /** + * Creates a new instance of ComputeRecurrenceFrequency value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeRecurrenceFrequency() { + } + + /** + * Creates or finds a ComputeRecurrenceFrequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeRecurrenceFrequency. + */ + @JsonCreator + public static ComputeRecurrenceFrequency fromString(String name) { + return fromString(name, ComputeRecurrenceFrequency.class); + } + + /** + * Gets known ComputeRecurrenceFrequency values. + * + * @return known ComputeRecurrenceFrequency values. + */ + public static Collection values() { + return values(ComputeRecurrenceFrequency.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java new file mode 100644 index 0000000000000..36ef36dc3d1bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ComputeRecurrenceSchedule model. */ +@Fluent +public final class ComputeRecurrenceSchedule { + /* + * [Required] List of hours for the schedule. + */ + @JsonProperty(value = "hours", required = true) + private List hours; + + /* + * [Required] List of minutes for the schedule. + */ + @JsonProperty(value = "minutes", required = true) + private List minutes; + + /* + * List of month days for the schedule + */ + @JsonProperty(value = "monthDays") + private List monthDays; + + /* + * List of days for the schedule. + */ + @JsonProperty(value = "weekDays") + private List weekDays; + + /** Creates an instance of ComputeRecurrenceSchedule class. */ + public ComputeRecurrenceSchedule() { + } + + /** + * Get the hours property: [Required] List of hours for the schedule. + * + * @return the hours value. + */ + public List hours() { + return this.hours; + } + + /** + * Set the hours property: [Required] List of hours for the schedule. + * + * @param hours the hours value to set. + * @return the ComputeRecurrenceSchedule object itself. + */ + public ComputeRecurrenceSchedule withHours(List hours) { + this.hours = hours; + return this; + } + + /** + * Get the minutes property: [Required] List of minutes for the schedule. + * + * @return the minutes value. + */ + public List minutes() { + return this.minutes; + } + + /** + * Set the minutes property: [Required] List of minutes for the schedule. + * + * @param minutes the minutes value to set. + * @return the ComputeRecurrenceSchedule object itself. + */ + public ComputeRecurrenceSchedule withMinutes(List minutes) { + this.minutes = minutes; + return this; + } + + /** + * Get the monthDays property: List of month days for the schedule. + * + * @return the monthDays value. + */ + public List monthDays() { + return this.monthDays; + } + + /** + * Set the monthDays property: List of month days for the schedule. + * + * @param monthDays the monthDays value to set. + * @return the ComputeRecurrenceSchedule object itself. + */ + public ComputeRecurrenceSchedule withMonthDays(List monthDays) { + this.monthDays = monthDays; + return this; + } + + /** + * Get the weekDays property: List of days for the schedule. + * + * @return the weekDays value. + */ + public List weekDays() { + return this.weekDays; + } + + /** + * Set the weekDays property: List of days for the schedule. + * + * @param weekDays the weekDays value to set. + * @return the ComputeRecurrenceSchedule object itself. + */ + public ComputeRecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hours() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property hours in model ComputeRecurrenceSchedule")); + } + if (minutes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property minutes in model ComputeRecurrenceSchedule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ComputeRecurrenceSchedule.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java index 2a15fb09ae3ff..0be7e4369a319 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java @@ -109,11 +109,13 @@ public interface ComputeResource { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The ComputeResource definition stages. */ interface DefinitionStages { /** The first stage of the ComputeResource definition. */ interface Blank extends WithParentResource { } + /** The stage of the ComputeResource definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -125,6 +127,7 @@ interface WithParentResource { */ WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** * The stage of the ComputeResource 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. @@ -150,6 +153,7 @@ interface WithCreate */ ComputeResource create(Context context); } + /** The stage of the ComputeResource definition allowing to specify location. */ interface WithLocation { /** @@ -168,6 +172,7 @@ interface WithLocation { */ WithCreate withRegion(String location); } + /** The stage of the ComputeResource definition allowing to specify tags. */ interface WithTags { /** @@ -178,6 +183,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ComputeResource definition allowing to specify identity. */ interface WithIdentity { /** @@ -188,6 +194,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ComputeResource definition allowing to specify sku. */ interface WithSku { /** @@ -198,6 +205,7 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the ComputeResource definition allowing to specify properties. */ interface WithProperties { /** @@ -209,6 +217,7 @@ interface WithProperties { WithCreate withProperties(Compute properties); } } + /** * Begins update for the ComputeResource resource. * @@ -233,6 +242,7 @@ interface Update extends UpdateStages.WithProperties { */ ComputeResource apply(Context context); } + /** The ComputeResource update stages. */ interface UpdateStages { /** The stage of the ComputeResource update allowing to specify properties. */ @@ -246,6 +256,7 @@ interface WithProperties { Update withProperties(ScaleSettingsInformation properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java index 609941e651ab6..389b8c71ab99b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java @@ -38,19 +38,19 @@ public final class ComputeStartStopSchedule { * [Required] The schedule trigger type. */ @JsonProperty(value = "triggerType") - private TriggerType triggerType; + private ComputeTriggerType triggerType; /* * Required if triggerType is Recurrence. */ @JsonProperty(value = "recurrence") - private RecurrenceTrigger recurrence; + private Recurrence recurrence; /* * Required if triggerType is Cron. */ @JsonProperty(value = "cron") - private CronTrigger cron; + private Cron cron; /* * [Deprecated] Not used any more. @@ -125,7 +125,7 @@ public ComputeStartStopSchedule withAction(ComputePowerAction action) { * * @return the triggerType value. */ - public TriggerType triggerType() { + public ComputeTriggerType triggerType() { return this.triggerType; } @@ -135,7 +135,7 @@ public TriggerType triggerType() { * @param triggerType the triggerType value to set. * @return the ComputeStartStopSchedule object itself. */ - public ComputeStartStopSchedule withTriggerType(TriggerType triggerType) { + public ComputeStartStopSchedule withTriggerType(ComputeTriggerType triggerType) { this.triggerType = triggerType; return this; } @@ -145,7 +145,7 @@ public ComputeStartStopSchedule withTriggerType(TriggerType triggerType) { * * @return the recurrence value. */ - public RecurrenceTrigger recurrence() { + public Recurrence recurrence() { return this.recurrence; } @@ -155,7 +155,7 @@ public RecurrenceTrigger recurrence() { * @param recurrence the recurrence value to set. * @return the ComputeStartStopSchedule object itself. */ - public ComputeStartStopSchedule withRecurrence(RecurrenceTrigger recurrence) { + public ComputeStartStopSchedule withRecurrence(Recurrence recurrence) { this.recurrence = recurrence; return this; } @@ -165,7 +165,7 @@ public ComputeStartStopSchedule withRecurrence(RecurrenceTrigger recurrence) { * * @return the cron value. */ - public CronTrigger cron() { + public Cron cron() { return this.cron; } @@ -175,7 +175,7 @@ public CronTrigger cron() { * @param cron the cron value to set. * @return the ComputeStartStopSchedule object itself. */ - public ComputeStartStopSchedule withCron(CronTrigger cron) { + public ComputeStartStopSchedule withCron(Cron cron) { this.cron = cron; return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java new file mode 100644 index 0000000000000..4c590c4bdc802 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Is the trigger type recurrence or cron. */ +public final class ComputeTriggerType extends ExpandableStringEnum { + /** Static value Recurrence for ComputeTriggerType. */ + public static final ComputeTriggerType RECURRENCE = fromString("Recurrence"); + + /** Static value Cron for ComputeTriggerType. */ + public static final ComputeTriggerType CRON = fromString("Cron"); + + /** + * Creates a new instance of ComputeTriggerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeTriggerType() { + } + + /** + * Creates or finds a ComputeTriggerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeTriggerType. + */ + @JsonCreator + public static ComputeTriggerType fromString(String name) { + return fromString(name, ComputeTriggerType.class); + } + + /** + * Gets known ComputeTriggerType values. + * + * @return known ComputeTriggerType values. + */ + public static Collection values() { + return values(ComputeTriggerType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java new file mode 100644 index 0000000000000..4bcaa6ff2addd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum of weekday. */ +public final class ComputeWeekDay extends ExpandableStringEnum { + /** Static value Monday for ComputeWeekDay. */ + public static final ComputeWeekDay MONDAY = fromString("Monday"); + + /** Static value Tuesday for ComputeWeekDay. */ + public static final ComputeWeekDay TUESDAY = fromString("Tuesday"); + + /** Static value Wednesday for ComputeWeekDay. */ + public static final ComputeWeekDay WEDNESDAY = fromString("Wednesday"); + + /** Static value Thursday for ComputeWeekDay. */ + public static final ComputeWeekDay THURSDAY = fromString("Thursday"); + + /** Static value Friday for ComputeWeekDay. */ + public static final ComputeWeekDay FRIDAY = fromString("Friday"); + + /** Static value Saturday for ComputeWeekDay. */ + public static final ComputeWeekDay SATURDAY = fromString("Saturday"); + + /** Static value Sunday for ComputeWeekDay. */ + public static final ComputeWeekDay SUNDAY = fromString("Sunday"); + + /** + * Creates a new instance of ComputeWeekDay value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeWeekDay() { + } + + /** + * Creates or finds a ComputeWeekDay from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeWeekDay. + */ + @JsonCreator + public static ComputeWeekDay fromString(String name) { + return fromString(name, ComputeWeekDay.class); + } + + /** + * Gets known ComputeWeekDay values. + * + * @return known ComputeWeekDay values. + */ + public static Collection values() { + return values(ComputeWeekDay.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java new file mode 100644 index 0000000000000..e28869577e4ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CreateMonitorAction model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("CreateMonitor") +@Fluent +public final class CreateMonitorAction extends ScheduleActionBase { + /* + * [Required] Defines the monitor. + */ + @JsonProperty(value = "monitorDefinition", required = true) + private MonitorDefinition monitorDefinition; + + /** Creates an instance of CreateMonitorAction class. */ + public CreateMonitorAction() { + } + + /** + * Get the monitorDefinition property: [Required] Defines the monitor. + * + * @return the monitorDefinition value. + */ + public MonitorDefinition monitorDefinition() { + return this.monitorDefinition; + } + + /** + * Set the monitorDefinition property: [Required] Defines the monitor. + * + * @param monitorDefinition the monitorDefinition value to set. + * @return the CreateMonitorAction object itself. + */ + public CreateMonitorAction withMonitorDefinition(MonitorDefinition monitorDefinition) { + this.monitorDefinition = monitorDefinition; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (monitorDefinition() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property monitorDefinition in model CreateMonitorAction")); + } else { + monitorDefinition().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CreateMonitorAction.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java new file mode 100644 index 0000000000000..e0be7b771ec00 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workflow trigger cron for ComputeStartStop schedule type. */ +@Fluent +public final class Cron { + /* + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * Specifies time zone in which the schedule runs. + * TimeZone should follow Windows time zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * [Required] Specifies cron expression of schedule. + * The expression should follow NCronTab format. + */ + @JsonProperty(value = "expression") + private String expression; + + /** Creates an instance of Cron class. */ + public Cron() { + } + + /** + * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @param startTime the startTime value to set. + * @return the Cron object itself. + */ + public Cron withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the Cron object itself. + */ + public Cron withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow + * NCronTab format. + * + * @param expression the expression value to set. + * @return the Cron object itself. + */ + public Cron withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java new file mode 100644 index 0000000000000..5c52e2f896033 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CustomMetricThreshold model. */ +@Fluent +public final class CustomMetricThreshold { + /* + * [Required] The user-defined metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private String metric; + + /* + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @JsonProperty(value = "threshold") + private MonitoringThreshold threshold; + + /** Creates an instance of CustomMetricThreshold class. */ + public CustomMetricThreshold() { + } + + /** + * Get the metric property: [Required] The user-defined metric to calculate. + * + * @return the metric value. + */ + public String metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The user-defined metric to calculate. + * + * @param metric the metric value to set. + * @return the CustomMetricThreshold object itself. + */ + public CustomMetricThreshold withMetric(String metric) { + this.metric = metric; + return this; + } + + /** + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @return the threshold value. + */ + public MonitoringThreshold threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the CustomMetricThreshold object itself. + */ + public CustomMetricThreshold withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property metric in model CustomMetricThreshold")); + } + if (threshold() != null) { + threshold().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java new file mode 100644 index 0000000000000..3d815ee6bcd20 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The CustomMonitoringSignal model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("Custom") +@Fluent +public final class CustomMonitoringSignal extends MonitoringSignalBase { + /* + * [Required] Reference to the component asset used to calculate the custom metrics. + */ + @JsonProperty(value = "componentId", required = true) + private String componentId; + + /* + * Monitoring assets to take as input. Key is the component input port name, value is the data asset. + */ + @JsonProperty(value = "inputAssets") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputAssets; + + /* + * Extra component parameters to take as input. Key is the component literal input port name, value is the + * parameter value. + */ + @JsonProperty(value = "inputs") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputs; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /** Creates an instance of CustomMonitoringSignal class. */ + public CustomMonitoringSignal() { + } + + /** + * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @param componentId the componentId value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + + /** + * Get the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is + * the data asset. + * + * @return the inputAssets value. + */ + public Map inputAssets() { + return this.inputAssets; + } + + /** + * Set the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is + * the data asset. + * + * @param inputAssets the inputAssets value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withInputAssets(Map inputAssets) { + this.inputAssets = inputAssets; + return this; + } + + /** + * Get the inputs property: Extra component parameters to take as input. Key is the component literal input port + * name, value is the parameter value. + * + * @return the inputs value. + */ + public Map inputs() { + return this.inputs; + } + + /** + * Set the inputs property: Extra component parameters to take as input. Key is the component literal input port + * name, value is the parameter value. + * + * @param inputs the inputs value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withInputs(Map inputs) { + this.inputs = inputs; + return this; + } + + /** + * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withMetricThresholds(List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** {@inheritDoc} */ + @Override + public CustomMonitoringSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public CustomMonitoringSignal withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (componentId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property componentId in model CustomMonitoringSignal")); + } + if (inputAssets() != null) { + inputAssets() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (inputs() != null) { + inputs() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (metricThresholds() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricThresholds in model CustomMonitoringSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java new file mode 100644 index 0000000000000..a2534931c6119 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Specifies the custom service configuration. */ +@Fluent +public final class CustomService { + /* + * Name of the Custom Service + */ + @JsonProperty(value = "name") + private String name; + + /* + * Describes the Image Specifications + */ + @JsonProperty(value = "image") + private Image image; + + /* + * Environment Variable for the container + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Describes the docker settings for the image + */ + @JsonProperty(value = "docker") + private Docker docker; + + /* + * Configuring the endpoints for the container + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /* + * Configuring the volumes for the container + */ + @JsonProperty(value = "volumes") + private List volumes; + + /* + * Specifies the custom service configuration + */ + @JsonIgnore private Map additionalProperties; + + /** Creates an instance of CustomService class. */ + public CustomService() { + } + + /** + * Get the name property: Name of the Custom Service. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Custom Service. + * + * @param name the name value to set. + * @return the CustomService object itself. + */ + public CustomService withName(String name) { + this.name = name; + return this; + } + + /** + * Get the image property: Describes the Image Specifications. + * + * @return the image value. + */ + public Image image() { + return this.image; + } + + /** + * Set the image property: Describes the Image Specifications. + * + * @param image the image value to set. + * @return the CustomService object itself. + */ + public CustomService withImage(Image image) { + this.image = image; + return this; + } + + /** + * Get the environmentVariables property: Environment Variable for the container. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment Variable for the container. + * + * @param environmentVariables the environmentVariables value to set. + * @return the CustomService object itself. + */ + public CustomService withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the docker property: Describes the docker settings for the image. + * + * @return the docker value. + */ + public Docker docker() { + return this.docker; + } + + /** + * Set the docker property: Describes the docker settings for the image. + * + * @param docker the docker value to set. + * @return the CustomService object itself. + */ + public CustomService withDocker(Docker docker) { + this.docker = docker; + return this; + } + + /** + * Get the endpoints property: Configuring the endpoints for the container. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: Configuring the endpoints for the container. + * + * @param endpoints the endpoints value to set. + * @return the CustomService object itself. + */ + public CustomService withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the volumes property: Configuring the volumes for the container. + * + * @return the volumes value. + */ + public List volumes() { + return this.volumes; + } + + /** + * Set the volumes property: Configuring the volumes for the container. + * + * @param volumes the volumes value to set. + * @return the CustomService object itself. + */ + public CustomService withVolumes(List volumes) { + this.volumes = volumes; + return this; + } + + /** + * Get the additionalProperties property: Specifies the custom service configuration. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Specifies the custom service configuration. + * + * @param additionalProperties the additionalProperties value to set. + * @return the CustomService object itself. + */ + public CustomService withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (image() != null) { + image().validate(); + } + if (environmentVariables() != null) { + environmentVariables() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (docker() != null) { + docker().validate(); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + if (volumes() != null) { + volumes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java new file mode 100644 index 0000000000000..954758444a495 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DataAvailabilityStatus. */ +public final class DataAvailabilityStatus extends ExpandableStringEnum { + /** Static value None for DataAvailabilityStatus. */ + public static final DataAvailabilityStatus NONE = fromString("None"); + + /** Static value Pending for DataAvailabilityStatus. */ + public static final DataAvailabilityStatus PENDING = fromString("Pending"); + + /** Static value Incomplete for DataAvailabilityStatus. */ + public static final DataAvailabilityStatus INCOMPLETE = fromString("Incomplete"); + + /** Static value Complete for DataAvailabilityStatus. */ + public static final DataAvailabilityStatus COMPLETE = fromString("Complete"); + + /** + * Creates a new instance of DataAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataAvailabilityStatus() { + } + + /** + * Creates or finds a DataAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataAvailabilityStatus. + */ + @JsonCreator + public static DataAvailabilityStatus fromString(String name) { + return fromString(name, DataAvailabilityStatus.class); + } + + /** + * Gets known DataAvailabilityStatus values. + * + * @return known DataAvailabilityStatus values. + */ + public static Collection values() { + return values(DataAvailabilityStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java index 59ae115c87e89..674fabc5121f1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java @@ -66,22 +66,25 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The DataContainer definition stages. */ interface DefinitionStages { /** The first stage of the DataContainer definition. */ interface Blank extends WithParentResource { } + /** The stage of the DataContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } + /** The stage of the DataContainer definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(DataContainerProperties properties); } + /** * The stage of the DataContainer 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. @@ -113,6 +117,7 @@ interface WithCreate { DataContainer create(Context context); } } + /** * Begins update for the DataContainer resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ DataContainer apply(Context context); } + /** The DataContainer update stages. */ interface UpdateStages { /** The stage of the DataContainer update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(DataContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java index 8962c038ec253..7449789db102e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; /** Resource collection API of DataContainers. */ public interface DataContainers { @@ -93,55 +94,32 @@ Response getWithResponse( DataContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get container. - * - * @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 container along with {@link Response}. - */ - DataContainer getById(String id); - - /** - * Get container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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 azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataContainer resource. - * - * @param name resource name. - * @return the first stage of the new DataContainer definition. + * @return azure Resource Manager resource envelope. */ - DataContainer.DefinitionStages.Blank define(String name); + DataContainer createOrUpdate(String resourceGroupName, String workspaceName, String name, DataContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java new file mode 100644 index 0000000000000..484faf51b39d8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The DataDriftMetricThresholdBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "dataType", + defaultImpl = DataDriftMetricThresholdBase.class) +@JsonTypeName("DataDriftMetricThresholdBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Categorical", value = CategoricalDataDriftMetricThreshold.class), + @JsonSubTypes.Type(name = "Numerical", value = NumericalDataDriftMetricThreshold.class) +}) +@Fluent +public class DataDriftMetricThresholdBase { + /* + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @JsonProperty(value = "threshold") + private MonitoringThreshold threshold; + + /** Creates an instance of DataDriftMetricThresholdBase class. */ + public DataDriftMetricThresholdBase() { + } + + /** + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @return the threshold value. + */ + public MonitoringThreshold threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the DataDriftMetricThresholdBase object itself. + */ + public DataDriftMetricThresholdBase withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (threshold() != null) { + threshold().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java new file mode 100644 index 0000000000000..828f84cd9d004 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The DataDriftMonitoringSignal model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("DataDrift") +@Fluent +public final class DataDriftMonitoringSignal extends MonitoringSignalBase { + /* + * A dictionary that maps feature names to their respective data types. + */ + @JsonProperty(value = "featureDataTypeOverride") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map featureDataTypeOverride; + + /* + * The settings for computing feature importance. + */ + @JsonProperty(value = "featureImportanceSettings") + private FeatureImportanceSettings featureImportanceSettings; + + /* + * The feature filter which identifies which feature to calculate drift over. + */ + @JsonProperty(value = "features") + private MonitoringFeatureFilterBase features; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /* + * [Required] The data which drift will be calculated for. + */ + @JsonProperty(value = "productionData", required = true) + private MonitoringInputDataBase productionData; + + /* + * [Required] The data to calculate drift against. + */ + @JsonProperty(value = "referenceData", required = true) + private MonitoringInputDataBase referenceData; + + /** Creates an instance of DataDriftMonitoringSignal class. */ + public DataDriftMonitoringSignal() { + } + + /** + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @return the featureDataTypeOverride value. + */ + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; + } + + /** + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @param featureDataTypeOverride the featureDataTypeOverride value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withFeatureDataTypeOverride( + Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; + return this; + } + + /** + * Get the featureImportanceSettings property: The settings for computing feature importance. + * + * @return the featureImportanceSettings value. + */ + public FeatureImportanceSettings featureImportanceSettings() { + return this.featureImportanceSettings; + } + + /** + * Set the featureImportanceSettings property: The settings for computing feature importance. + * + * @param featureImportanceSettings the featureImportanceSettings value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withFeatureImportanceSettings( + FeatureImportanceSettings featureImportanceSettings) { + this.featureImportanceSettings = featureImportanceSettings; + return this; + } + + /** + * Get the features property: The feature filter which identifies which feature to calculate drift over. + * + * @return the features value. + */ + public MonitoringFeatureFilterBase features() { + return this.features; + } + + /** + * Set the features property: The feature filter which identifies which feature to calculate drift over. + * + * @param features the features value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { + this.features = features; + return this; + } + + /** + * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withMetricThresholds(List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** + * Get the productionData property: [Required] The data which drift will be calculated for. + * + * @return the productionData value. + */ + public MonitoringInputDataBase productionData() { + return this.productionData; + } + + /** + * Set the productionData property: [Required] The data which drift will be calculated for. + * + * @param productionData the productionData value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the referenceData property: [Required] The data to calculate drift against. + * + * @return the referenceData value. + */ + public MonitoringInputDataBase referenceData() { + return this.referenceData; + } + + /** + * Set the referenceData property: [Required] The data to calculate drift against. + * + * @param referenceData the referenceData value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { + this.referenceData = referenceData; + return this; + } + + /** {@inheritDoc} */ + @Override + public DataDriftMonitoringSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataDriftMonitoringSignal withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (featureImportanceSettings() != null) { + featureImportanceSettings().validate(); + } + if (features() != null) { + features().validate(); + } + if (metricThresholds() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricThresholds in model DataDriftMonitoringSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + if (productionData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productionData in model DataDriftMonitoringSignal")); + } else { + productionData().validate(); + } + if (referenceData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property referenceData in model DataDriftMonitoringSignal")); + } else { + referenceData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataDriftMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java new file mode 100644 index 0000000000000..6ff863c121f69 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The DataQualityMetricThresholdBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "dataType", + defaultImpl = DataQualityMetricThresholdBase.class) +@JsonTypeName("DataQualityMetricThresholdBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Categorical", value = CategoricalDataQualityMetricThreshold.class), + @JsonSubTypes.Type(name = "Numerical", value = NumericalDataQualityMetricThreshold.class) +}) +@Fluent +public class DataQualityMetricThresholdBase { + /* + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @JsonProperty(value = "threshold") + private MonitoringThreshold threshold; + + /** Creates an instance of DataQualityMetricThresholdBase class. */ + public DataQualityMetricThresholdBase() { + } + + /** + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @return the threshold value. + */ + public MonitoringThreshold threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the DataQualityMetricThresholdBase object itself. + */ + public DataQualityMetricThresholdBase withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (threshold() != null) { + threshold().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java new file mode 100644 index 0000000000000..8ba906c14f0be --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The DataQualityMonitoringSignal model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("DataQuality") +@Fluent +public final class DataQualityMonitoringSignal extends MonitoringSignalBase { + /* + * A dictionary that maps feature names to their respective data types. + */ + @JsonProperty(value = "featureDataTypeOverride") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map featureDataTypeOverride; + + /* + * The settings for computing feature importance. + */ + @JsonProperty(value = "featureImportanceSettings") + private FeatureImportanceSettings featureImportanceSettings; + + /* + * The features to calculate drift over. + */ + @JsonProperty(value = "features") + private MonitoringFeatureFilterBase features; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /* + * [Required] The data produced by the production service which drift will be calculated for. + */ + @JsonProperty(value = "productionData", required = true) + private MonitoringInputDataBase productionData; + + /* + * [Required] The data to calculate drift against. + */ + @JsonProperty(value = "referenceData", required = true) + private MonitoringInputDataBase referenceData; + + /** Creates an instance of DataQualityMonitoringSignal class. */ + public DataQualityMonitoringSignal() { + } + + /** + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @return the featureDataTypeOverride value. + */ + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; + } + + /** + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @param featureDataTypeOverride the featureDataTypeOverride value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withFeatureDataTypeOverride( + Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; + return this; + } + + /** + * Get the featureImportanceSettings property: The settings for computing feature importance. + * + * @return the featureImportanceSettings value. + */ + public FeatureImportanceSettings featureImportanceSettings() { + return this.featureImportanceSettings; + } + + /** + * Set the featureImportanceSettings property: The settings for computing feature importance. + * + * @param featureImportanceSettings the featureImportanceSettings value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withFeatureImportanceSettings( + FeatureImportanceSettings featureImportanceSettings) { + this.featureImportanceSettings = featureImportanceSettings; + return this; + } + + /** + * Get the features property: The features to calculate drift over. + * + * @return the features value. + */ + public MonitoringFeatureFilterBase features() { + return this.features; + } + + /** + * Set the features property: The features to calculate drift over. + * + * @param features the features value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { + this.features = features; + return this; + } + + /** + * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withMetricThresholds(List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** + * Get the productionData property: [Required] The data produced by the production service which drift will be + * calculated for. + * + * @return the productionData value. + */ + public MonitoringInputDataBase productionData() { + return this.productionData; + } + + /** + * Set the productionData property: [Required] The data produced by the production service which drift will be + * calculated for. + * + * @param productionData the productionData value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the referenceData property: [Required] The data to calculate drift against. + * + * @return the referenceData value. + */ + public MonitoringInputDataBase referenceData() { + return this.referenceData; + } + + /** + * Set the referenceData property: [Required] The data to calculate drift against. + * + * @param referenceData the referenceData value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { + this.referenceData = referenceData; + return this; + } + + /** {@inheritDoc} */ + @Override + public DataQualityMonitoringSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataQualityMonitoringSignal withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (featureImportanceSettings() != null) { + featureImportanceSettings().validate(); + } + if (features() != null) { + features().validate(); + } + if (metricThresholds() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricThresholds in model DataQualityMonitoringSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + if (productionData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productionData in model DataQualityMonitoringSignal")); + } else { + productionData().validate(); + } + if (referenceData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property referenceData in model DataQualityMonitoringSignal")); + } else { + referenceData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataQualityMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java new file mode 100644 index 0000000000000..ffc44a4694f9e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** DataReferenceCredential base class. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "credentialType", + defaultImpl = DataReferenceCredential.class) +@JsonTypeName("DataReferenceCredential") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "NoCredentials", value = AnonymousAccessCredential.class), + @JsonSubTypes.Type(name = "DockerCredentials", value = DockerCredential.class), + @JsonSubTypes.Type(name = "ManagedIdentity", value = ManagedIdentityCredential.class), + @JsonSubTypes.Type(name = "SAS", value = SasCredential.class) +}) +@Immutable +public class DataReferenceCredential { + /** Creates an instance of DataReferenceCredential class. */ + public DataReferenceCredential() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java new file mode 100644 index 0000000000000..ef82f6dc1ddca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to determine the DataReference credentials type. */ +public final class DataReferenceCredentialType extends ExpandableStringEnum { + /** Static value SAS for DataReferenceCredentialType. */ + public static final DataReferenceCredentialType SAS = fromString("SAS"); + + /** Static value DockerCredentials for DataReferenceCredentialType. */ + public static final DataReferenceCredentialType DOCKER_CREDENTIALS = fromString("DockerCredentials"); + + /** Static value ManagedIdentity for DataReferenceCredentialType. */ + public static final DataReferenceCredentialType MANAGED_IDENTITY = fromString("ManagedIdentity"); + + /** Static value NoCredentials for DataReferenceCredentialType. */ + public static final DataReferenceCredentialType NO_CREDENTIALS = fromString("NoCredentials"); + + /** + * Creates a new instance of DataReferenceCredentialType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataReferenceCredentialType() { + } + + /** + * Creates or finds a DataReferenceCredentialType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataReferenceCredentialType. + */ + @JsonCreator + public static DataReferenceCredentialType fromString(String name) { + return fromString(name, DataReferenceCredentialType.class); + } + + /** + * Gets known DataReferenceCredentialType values. + * + * @return known DataReferenceCredentialType values. + */ + public static Collection values() { + return values(DataReferenceCredentialType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java index ad254ac4664f8..26d7b28b296ed 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; @@ -66,23 +67,26 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The DataVersionBase definition stages. */ interface DefinitionStages { /** The first stage of the DataVersionBase definition. */ interface Blank extends WithParentResource { } + /** The stage of the DataVersionBase definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @return the next definition stage. */ - WithProperties withExistingData(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingData(String resourceGroupName, String registryName, String name); } + /** The stage of the DataVersionBase definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +97,7 @@ interface WithProperties { */ WithCreate withProperties(DataVersionBaseProperties properties); } + /** * The stage of the DataVersionBase 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. @@ -114,6 +119,7 @@ interface WithCreate { DataVersionBase create(Context context); } } + /** * Begins update for the DataVersionBase resource. * @@ -138,6 +144,7 @@ interface Update extends UpdateStages.WithProperties { */ DataVersionBase apply(Context context); } + /** The DataVersionBase update stages. */ interface UpdateStages { /** The stage of the DataVersionBase update allowing to specify properties. */ @@ -151,6 +158,7 @@ interface WithProperties { Update withProperties(DataVersionBaseProperties properties); } } + /** * Refreshes the resource to sync with Azure. * @@ -165,4 +173,28 @@ interface WithProperties { * @return the refreshed resource. */ DataVersionBase refresh(Context context); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java index ad6fb4df7677d..0e203b0b07e82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java @@ -27,8 +27,7 @@ @Fluent public class DataVersionBaseProperties extends AssetBase { /* - * [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + * [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 */ @JsonProperty(value = "dataUri", required = true) private String dataUri; @@ -38,8 +37,7 @@ public DataVersionBaseProperties() { } /** - * Get the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + * Get the dataUri property: [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. * * @return the dataUri value. */ @@ -48,8 +46,7 @@ public String dataUri() { } /** - * Set the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + * Set the dataUri property: [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. * * @param dataUri the dataUri value to set. * @return the DataVersionBaseProperties object itself. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java index e5234415cf8bc..d9f6485cafdc7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; /** Resource collection API of DataVersions. */ public interface DataVersions { @@ -113,55 +114,75 @@ Response getWithResponse( DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - DataVersionBase getById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + DataVersionBaseInner body, + Context context); /** - * Get version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope. */ - Response getByIdWithResponse(String id, Context context); + DataVersionBase createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataVersionBase resource. - * - * @param name resource name. - * @return the first stage of the new DataVersionBase definition. */ - DataVersionBase.DefinitionStages.Blank define(String name); + void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java index 7b181093c6e26..93cd4ec14f5a4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java @@ -67,11 +67,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The Datastore definition stages. */ interface DefinitionStages { /** The first stage of the Datastore definition. */ interface Blank extends WithParentResource { } + /** The stage of the Datastore definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -83,6 +85,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the Datastore definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +96,7 @@ interface WithProperties { */ WithCreate withProperties(DatastoreProperties properties); } + /** * The stage of the Datastore 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. @@ -113,6 +117,7 @@ interface WithCreate extends DefinitionStages.WithSkipValidation { */ Datastore create(Context context); } + /** The stage of the Datastore definition allowing to specify skipValidation. */ interface WithSkipValidation { /** @@ -124,6 +129,7 @@ interface WithSkipValidation { WithCreate withSkipValidation(Boolean skipValidation); } } + /** * Begins update for the Datastore resource. * @@ -148,6 +154,7 @@ interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValid */ Datastore apply(Context context); } + /** The Datastore update stages. */ interface UpdateStages { /** The stage of the Datastore update allowing to specify properties. */ @@ -160,6 +167,7 @@ interface WithProperties { */ Update withProperties(DatastoreProperties properties); } + /** The stage of the Datastore update allowing to specify skipValidation. */ interface WithSkipValidation { /** @@ -171,6 +179,7 @@ interface WithSkipValidation { Update withSkipValidation(Boolean skipValidation); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java new file mode 100644 index 0000000000000..6bf415a0fbf1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Publishing destination registry asset information. */ +@Fluent +public final class DestinationAsset { + /* + * Destination asset name + */ + @JsonProperty(value = "destinationName") + private String destinationName; + + /* + * Destination asset version + */ + @JsonProperty(value = "destinationVersion") + private String destinationVersion; + + /* + * Destination registry name + */ + @JsonProperty(value = "registryName") + private String registryName; + + /** Creates an instance of DestinationAsset class. */ + public DestinationAsset() { + } + + /** + * Get the destinationName property: Destination asset name. + * + * @return the destinationName value. + */ + public String destinationName() { + return this.destinationName; + } + + /** + * Set the destinationName property: Destination asset name. + * + * @param destinationName the destinationName value to set. + * @return the DestinationAsset object itself. + */ + public DestinationAsset withDestinationName(String destinationName) { + this.destinationName = destinationName; + return this; + } + + /** + * Get the destinationVersion property: Destination asset version. + * + * @return the destinationVersion value. + */ + public String destinationVersion() { + return this.destinationVersion; + } + + /** + * Set the destinationVersion property: Destination asset version. + * + * @param destinationVersion the destinationVersion value to set. + * @return the DestinationAsset object itself. + */ + public DestinationAsset withDestinationVersion(String destinationVersion) { + this.destinationVersion = destinationVersion; + return this; + } + + /** + * Get the registryName property: Destination registry name. + * + * @return the registryName value. + */ + public String registryName() { + return this.registryName; + } + + /** + * Set the registryName property: Destination registry name. + * + * @param registryName the registryName value to set. + * @return the DestinationAsset object itself. + */ + public DestinationAsset withRegistryName(String registryName) { + this.registryName = registryName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java new file mode 100644 index 0000000000000..ca23cf16e7496 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** Docker container configuration. */ +@Fluent +public final class Docker { + /* + * Indicate whether container shall run in privileged or non-privileged mode. + */ + @JsonProperty(value = "privileged") + private Boolean privileged; + + /* + * Docker container configuration + */ + @JsonIgnore private Map additionalProperties; + + /** Creates an instance of Docker class. */ + public Docker() { + } + + /** + * Get the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @return the privileged value. + */ + public Boolean privileged() { + return this.privileged; + } + + /** + * Set the privileged property: Indicate whether container shall run in privileged or non-privileged mode. + * + * @param privileged the privileged value to set. + * @return the Docker object itself. + */ + public Docker withPrivileged(Boolean privileged) { + this.privileged = privileged; + return this; + } + + /** + * Get the additionalProperties property: Docker container configuration. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Docker container configuration. + * + * @param additionalProperties the additionalProperties value to set. + * @return the Docker object itself. + */ + public Docker withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java new file mode 100644 index 0000000000000..d53d1d09f7820 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Credential for docker with username and password. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialType") +@JsonTypeName("DockerCredentials") +@Fluent +public final class DockerCredential extends DataReferenceCredential { + /* + * DockerCredential user password + */ + @JsonProperty(value = "password") + private String password; + + /* + * DockerCredential user name + */ + @JsonProperty(value = "userName") + private String username; + + /** Creates an instance of DockerCredential class. */ + public DockerCredential() { + } + + /** + * Get the password property: DockerCredential user password. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: DockerCredential user password. + * + * @param password the password value to set. + * @return the DockerCredential object itself. + */ + public DockerCredential withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the username property: DockerCredential user name. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: DockerCredential user name. + * + * @param username the username value to set. + * @return the DockerCredential object itself. + */ + public DockerCredential withUsername(String username) { + this.username = username; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java new file mode 100644 index 0000000000000..1afe39952eea2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to determine the email notification type. */ +public final class EmailNotificationEnableType extends ExpandableStringEnum { + /** Static value JobCompleted for EmailNotificationEnableType. */ + public static final EmailNotificationEnableType JOB_COMPLETED = fromString("JobCompleted"); + + /** Static value JobFailed for EmailNotificationEnableType. */ + public static final EmailNotificationEnableType JOB_FAILED = fromString("JobFailed"); + + /** Static value JobCancelled for EmailNotificationEnableType. */ + public static final EmailNotificationEnableType JOB_CANCELLED = fromString("JobCancelled"); + + /** + * Creates a new instance of EmailNotificationEnableType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EmailNotificationEnableType() { + } + + /** + * Creates or finds a EmailNotificationEnableType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EmailNotificationEnableType. + */ + @JsonCreator + public static EmailNotificationEnableType fromString(String name) { + return fromString(name, EmailNotificationEnableType.class); + } + + /** + * Gets known EmailNotificationEnableType values. + * + * @return known EmailNotificationEnableType values. + */ + public static Collection values() { + return values(EmailNotificationEnableType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java new file mode 100644 index 0000000000000..2d30ef32dc471 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the endpoint configuration for the container. */ +@Fluent +public final class Endpoint { + /* + * Endpoint Communication Protocol + * + * Protocol over which communication will happen over this endpoint + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /* + * Name of the Endpoint + */ + @JsonProperty(value = "name") + private String name; + + /* + * Application port inside the container. + */ + @JsonProperty(value = "target") + private Integer target; + + /* + * Port over which the application is exposed from container. + */ + @JsonProperty(value = "published") + private Integer published; + + /* + * Host IP over which the application is exposed from the container + */ + @JsonProperty(value = "hostIp") + private String hostIp; + + /** Creates an instance of Endpoint class. */ + public Endpoint() { + } + + /** + * Get the protocol property: Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + * + * @return the protocol value. + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + * + * @param protocol the protocol value to set. + * @return the Endpoint object itself. + */ + public Endpoint withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the name property: Name of the Endpoint. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the Endpoint. + * + * @param name the name value to set. + * @return the Endpoint object itself. + */ + public Endpoint withName(String name) { + this.name = name; + return this; + } + + /** + * Get the target property: Application port inside the container. + * + * @return the target value. + */ + public Integer target() { + return this.target; + } + + /** + * Set the target property: Application port inside the container. + * + * @param target the target value to set. + * @return the Endpoint object itself. + */ + public Endpoint withTarget(Integer target) { + this.target = target; + return this; + } + + /** + * Get the published property: Port over which the application is exposed from container. + * + * @return the published value. + */ + public Integer published() { + return this.published; + } + + /** + * Set the published property: Port over which the application is exposed from container. + * + * @param published the published value to set. + * @return the Endpoint object itself. + */ + public Endpoint withPublished(Integer published) { + this.published = published; + return this; + } + + /** + * Get the hostIp property: Host IP over which the application is exposed from the container. + * + * @return the hostIp value. + */ + public String hostIp() { + return this.hostIp; + } + + /** + * Set the hostIp property: Host IP over which the application is exposed from the container. + * + * @param hostIp the hostIp value to set. + * @return the Endpoint object itself. + */ + public Endpoint withHostIp(String hostIp) { + this.hostIp = hostIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java new file mode 100644 index 0000000000000..5b833f6c6b35c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Connection status of the service consumer with the service provider. */ +public final class EndpointServiceConnectionStatus extends ExpandableStringEnum { + /** Static value Approved for EndpointServiceConnectionStatus. */ + public static final EndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Pending for EndpointServiceConnectionStatus. */ + public static final EndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Rejected for EndpointServiceConnectionStatus. */ + public static final EndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for EndpointServiceConnectionStatus. */ + public static final EndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of EndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointServiceConnectionStatus() { + } + + /** + * Creates or finds a EndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointServiceConnectionStatus. + */ + @JsonCreator + public static EndpointServiceConnectionStatus fromString(String name) { + return fromString(name, EndpointServiceConnectionStatus.class); + } + + /** + * Gets known EndpointServiceConnectionStatus values. + * + * @return known EndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(EndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java index 0256e791b224a..2090a05417d44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java @@ -66,22 +66,25 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The EnvironmentContainer definition stages. */ interface DefinitionStages { /** The first stage of the EnvironmentContainer definition. */ interface Blank extends WithParentResource { } + /** The stage of the EnvironmentContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } + /** The stage of the EnvironmentContainer definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(EnvironmentContainerProperties properties); } + /** * The stage of the EnvironmentContainer 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. @@ -113,6 +117,7 @@ interface WithCreate { EnvironmentContainer create(Context context); } } + /** * Begins update for the EnvironmentContainer resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ EnvironmentContainer apply(Context context); } + /** The EnvironmentContainer update stages. */ interface UpdateStages { /** The stage of the EnvironmentContainer update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(EnvironmentContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java index 772621f9cc4fd..8457c845624e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java @@ -5,15 +5,31 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Container for environment specification versions. */ @Fluent public final class EnvironmentContainerProperties extends AssetContainer { + /* + * Provisioning state for the environment container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of EnvironmentContainerProperties class. */ public EnvironmentContainerProperties() { } + /** + * Get the provisioningState property: Provisioning state for the environment container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public EnvironmentContainerProperties withIsArchived(Boolean isArchived) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java index a78c04678f4d4..2981052ad42df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; /** Resource collection API of EnvironmentContainers. */ public interface EnvironmentContainers { @@ -93,55 +94,33 @@ Response getWithResponse( EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get container. - * - * @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 container along with {@link Response}. - */ - EnvironmentContainer getById(String id); - - /** - * Get container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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 azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentContainer resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentContainer definition. + * @return azure Resource Manager resource envelope. */ - EnvironmentContainer.DefinitionStages.Blank define(String name); + EnvironmentContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java new file mode 100644 index 0000000000000..f51d68b46c929 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** Environment Variables for the container. */ +@Fluent +public final class EnvironmentVariable { + /* + * Type of Environment Variable + * + * Type of the Environment Variable. Possible values are: local - For local variable + */ + @JsonProperty(value = "type") + private EnvironmentVariableType type; + + /* + * Value of the Environment variable + */ + @JsonProperty(value = "value") + private String value; + + /* + * Environment Variables for the container + */ + @JsonIgnore private Map additionalProperties; + + /** Creates an instance of EnvironmentVariable class. */ + public EnvironmentVariable() { + } + + /** + * Get the type property: Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + * + * @return the type value. + */ + public EnvironmentVariableType type() { + return this.type; + } + + /** + * Set the type property: Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + * + * @param type the type value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withType(EnvironmentVariableType type) { + this.type = type; + return this; + } + + /** + * Get the value property: Value of the Environment variable. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of the Environment variable. + * + * @param value the value value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the additionalProperties property: Environment Variables for the container. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Environment Variables for the container. + * + * @param additionalProperties the additionalProperties value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java new file mode 100644 index 0000000000000..aa656a8a69863 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of Environment Variable + * + *

Type of the Environment Variable. Possible values are: local - For local variable. + */ +public final class EnvironmentVariableType extends ExpandableStringEnum { + /** Static value local for EnvironmentVariableType. */ + public static final EnvironmentVariableType LOCAL = fromString("local"); + + /** + * Creates a new instance of EnvironmentVariableType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnvironmentVariableType() { + } + + /** + * Creates or finds a EnvironmentVariableType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnvironmentVariableType. + */ + @JsonCreator + public static EnvironmentVariableType fromString(String name) { + return fromString(name, EnvironmentVariableType.class); + } + + /** + * Gets known EnvironmentVariableType values. + * + * @return known EnvironmentVariableType values. + */ + public static Collection values() { + return values(EnvironmentVariableType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java index 8c72da86c8b0e..efd8ffc02dac8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java @@ -66,23 +66,27 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The EnvironmentVersion definition stages. */ interface DefinitionStages { /** The first stage of the EnvironmentVersion definition. */ interface Blank extends WithParentResource { } + /** The stage of the EnvironmentVersion definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, environmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. * @return the next definition stage. */ - WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingEnvironment( + String resourceGroupName, String registryName, String environmentName); } + /** The stage of the EnvironmentVersion definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +97,7 @@ interface WithProperties { */ WithCreate withProperties(EnvironmentVersionProperties properties); } + /** * The stage of the EnvironmentVersion 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. @@ -114,6 +119,7 @@ interface WithCreate { EnvironmentVersion create(Context context); } } + /** * Begins update for the EnvironmentVersion resource. * @@ -138,6 +144,7 @@ interface Update extends UpdateStages.WithProperties { */ EnvironmentVersion apply(Context context); } + /** The EnvironmentVersion update stages. */ interface UpdateStages { /** The stage of the EnvironmentVersion update allowing to specify properties. */ @@ -151,6 +158,7 @@ interface WithProperties { Update withProperties(EnvironmentVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java index 97f7ff9208937..5a8f46353b796 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java @@ -43,8 +43,7 @@ public final class EnvironmentVersionProperties extends AssetBase { /* * Name of the image that will be used for the environment. * */ @JsonProperty(value = "image") @@ -62,6 +61,18 @@ public final class EnvironmentVersionProperties extends AssetBase { @JsonProperty(value = "osType") private OperatingSystemType osType; + /* + * Provisioning state for the environment version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /* + * Stage in the environment lifecycle assigned to this environment + */ + @JsonProperty(value = "stage") + private String stage; + /** Creates an instance of EnvironmentVersionProperties class. */ public EnvironmentVersionProperties() { } @@ -144,8 +155,7 @@ public EnvironmentType environmentType() { /** * Get the image property: Name of the image that will be used for the environment. <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning" - + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" * />. * * @return the image value. @@ -156,8 +166,7 @@ public String image() { /** * Set the image property: Name of the image that will be used for the environment. <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning" - + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" * />. * * @param image the image value to set. @@ -208,6 +217,35 @@ public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { return this; } + /** + * Get the provisioningState property: Provisioning state for the environment version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the stage property: Stage in the environment lifecycle assigned to this environment. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Stage in the environment lifecycle assigned to this environment. + * + * @param stage the stage value to set. + * @return the EnvironmentVersionProperties object itself. + */ + public EnvironmentVersionProperties withStage(String stage) { + this.stage = stage; + return this; + } + /** {@inheritDoc} */ @Override public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java index 42d2c70958795..1e531751dc06c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; /** Resource collection API of EnvironmentVersions. */ public interface EnvironmentVersions { @@ -109,55 +110,75 @@ Response getWithResponse( EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * Creates or updates an EnvironmentVersion. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param version Version of EnvironmentVersion. + * @param body Definition of EnvironmentVersion. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - EnvironmentVersion getById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + EnvironmentVersionInner body, + Context context); /** - * Get version. + * Creates or updates an EnvironmentVersion. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param version Version of EnvironmentVersion. + * @param body Definition of EnvironmentVersion. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope. */ - Response getByIdWithResponse(String id, Context context); + EnvironmentVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentVersion resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersion definition. */ - EnvironmentVersion.DefinitionStages.Blank define(String name); + void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java new file mode 100644 index 0000000000000..9a5ba337f4581 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.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.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; + +/** An immutable client-side representation of Feature. */ +public interface Feature { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + FeatureProperties 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.machinelearning.fluent.models.FeatureInner object. + * + * @return the inner object. + */ + FeatureInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java new file mode 100644 index 0000000000000..65a40f40f1fd5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The FeatureAttributionDriftMonitoringSignal model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("FeatureAttributionDrift") +@Fluent +public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { + /* + * A dictionary that maps feature names to their respective data types. + */ + @JsonProperty(value = "featureDataTypeOverride") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map featureDataTypeOverride; + + /* + * [Required] The settings for computing feature importance. + */ + @JsonProperty(value = "featureImportanceSettings", required = true) + private FeatureImportanceSettings featureImportanceSettings; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThreshold", required = true) + private FeatureAttributionMetricThreshold metricThreshold; + + /* + * [Required] The data which drift will be calculated for. + */ + @JsonProperty(value = "productionData", required = true) + private List productionData; + + /* + * [Required] The data to calculate drift against. + */ + @JsonProperty(value = "referenceData", required = true) + private MonitoringInputDataBase referenceData; + + /** Creates an instance of FeatureAttributionDriftMonitoringSignal class. */ + public FeatureAttributionDriftMonitoringSignal() { + } + + /** + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @return the featureDataTypeOverride value. + */ + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; + } + + /** + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @param featureDataTypeOverride the featureDataTypeOverride value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal withFeatureDataTypeOverride( + Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; + return this; + } + + /** + * Get the featureImportanceSettings property: [Required] The settings for computing feature importance. + * + * @return the featureImportanceSettings value. + */ + public FeatureImportanceSettings featureImportanceSettings() { + return this.featureImportanceSettings; + } + + /** + * Set the featureImportanceSettings property: [Required] The settings for computing feature importance. + * + * @param featureImportanceSettings the featureImportanceSettings value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal withFeatureImportanceSettings( + FeatureImportanceSettings featureImportanceSettings) { + this.featureImportanceSettings = featureImportanceSettings; + return this; + } + + /** + * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThreshold value. + */ + public FeatureAttributionMetricThreshold metricThreshold() { + return this.metricThreshold; + } + + /** + * Set the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThreshold the metricThreshold value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal withMetricThreshold( + FeatureAttributionMetricThreshold metricThreshold) { + this.metricThreshold = metricThreshold; + return this; + } + + /** + * Get the productionData property: [Required] The data which drift will be calculated for. + * + * @return the productionData value. + */ + public List productionData() { + return this.productionData; + } + + /** + * Set the productionData property: [Required] The data which drift will be calculated for. + * + * @param productionData the productionData value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal withProductionData(List productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the referenceData property: [Required] The data to calculate drift against. + * + * @return the referenceData value. + */ + public MonitoringInputDataBase referenceData() { + return this.referenceData; + } + + /** + * Set the referenceData property: [Required] The data to calculate drift against. + * + * @param referenceData the referenceData value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { + this.referenceData = referenceData; + return this; + } + + /** {@inheritDoc} */ + @Override + public FeatureAttributionDriftMonitoringSignal withNotificationTypes( + List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeatureAttributionDriftMonitoringSignal withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (featureImportanceSettings() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property featureImportanceSettings in model" + + " FeatureAttributionDriftMonitoringSignal")); + } else { + featureImportanceSettings().validate(); + } + if (metricThreshold() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricThreshold in model FeatureAttributionDriftMonitoringSignal")); + } else { + metricThreshold().validate(); + } + if (productionData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productionData in model FeatureAttributionDriftMonitoringSignal")); + } else { + productionData().forEach(e -> e.validate()); + } + if (referenceData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property referenceData in model FeatureAttributionDriftMonitoringSignal")); + } else { + referenceData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionDriftMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java new file mode 100644 index 0000000000000..46c0dbc8e4190 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for FeatureAttributionMetric. */ +public final class FeatureAttributionMetric extends ExpandableStringEnum { + /** Static value NormalizedDiscountedCumulativeGain for FeatureAttributionMetric. */ + public static final FeatureAttributionMetric NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN = + fromString("NormalizedDiscountedCumulativeGain"); + + /** + * Creates a new instance of FeatureAttributionMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureAttributionMetric() { + } + + /** + * Creates or finds a FeatureAttributionMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureAttributionMetric. + */ + @JsonCreator + public static FeatureAttributionMetric fromString(String name) { + return fromString(name, FeatureAttributionMetric.class); + } + + /** + * Gets known FeatureAttributionMetric values. + * + * @return known FeatureAttributionMetric values. + */ + public static Collection values() { + return values(FeatureAttributionMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java new file mode 100644 index 0000000000000..0f49bbe4e2328 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FeatureAttributionMetricThreshold model. */ +@Fluent +public final class FeatureAttributionMetricThreshold { + /* + * [Required] The feature attribution metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private FeatureAttributionMetric metric; + + /* + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @JsonProperty(value = "threshold") + private MonitoringThreshold threshold; + + /** Creates an instance of FeatureAttributionMetricThreshold class. */ + public FeatureAttributionMetricThreshold() { + } + + /** + * Get the metric property: [Required] The feature attribution metric to calculate. + * + * @return the metric value. + */ + public FeatureAttributionMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The feature attribution metric to calculate. + * + * @param metric the metric value to set. + * @return the FeatureAttributionMetricThreshold object itself. + */ + public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric metric) { + this.metric = metric; + return this; + } + + /** + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @return the threshold value. + */ + public MonitoringThreshold threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the FeatureAttributionMetricThreshold object itself. + */ + public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model FeatureAttributionMetricThreshold")); + } + if (threshold() != null) { + threshold().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java new file mode 100644 index 0000000000000..9ed9e1d0edc75 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for FeatureDataType. */ +public final class FeatureDataType extends ExpandableStringEnum { + /** Static value String for FeatureDataType. */ + public static final FeatureDataType STRING = fromString("String"); + + /** Static value Integer for FeatureDataType. */ + public static final FeatureDataType INTEGER = fromString("Integer"); + + /** Static value Long for FeatureDataType. */ + public static final FeatureDataType LONG = fromString("Long"); + + /** Static value Float for FeatureDataType. */ + public static final FeatureDataType FLOAT = fromString("Float"); + + /** Static value Double for FeatureDataType. */ + public static final FeatureDataType DOUBLE = fromString("Double"); + + /** Static value Binary for FeatureDataType. */ + public static final FeatureDataType BINARY = fromString("Binary"); + + /** Static value Datetime for FeatureDataType. */ + public static final FeatureDataType DATETIME = fromString("Datetime"); + + /** Static value Boolean for FeatureDataType. */ + public static final FeatureDataType BOOLEAN = fromString("Boolean"); + + /** + * Creates a new instance of FeatureDataType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureDataType() { + } + + /** + * Creates or finds a FeatureDataType from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureDataType. + */ + @JsonCreator + public static FeatureDataType fromString(String name) { + return fromString(name, FeatureDataType.class); + } + + /** + * Gets known FeatureDataType values. + * + * @return known FeatureDataType values. + */ + public static Collection values() { + return values(FeatureDataType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java new file mode 100644 index 0000000000000..18cede706f914 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The mode of operation for computing feature importance. */ +public final class FeatureImportanceMode extends ExpandableStringEnum { + /** Static value Disabled for FeatureImportanceMode. */ + public static final FeatureImportanceMode DISABLED = fromString("Disabled"); + + /** Static value Enabled for FeatureImportanceMode. */ + public static final FeatureImportanceMode ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of FeatureImportanceMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureImportanceMode() { + } + + /** + * Creates or finds a FeatureImportanceMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureImportanceMode. + */ + @JsonCreator + public static FeatureImportanceMode fromString(String name) { + return fromString(name, FeatureImportanceMode.class); + } + + /** + * Gets known FeatureImportanceMode values. + * + * @return known FeatureImportanceMode values. + */ + public static Collection values() { + return values(FeatureImportanceMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java new file mode 100644 index 0000000000000..60c870c0bfb54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FeatureImportanceSettings model. */ +@Fluent +public final class FeatureImportanceSettings { + /* + * The mode of operation for computing feature importance. + */ + @JsonProperty(value = "mode") + private FeatureImportanceMode mode; + + /* + * The name of the target column within the input data asset. + */ + @JsonProperty(value = "targetColumn") + private String targetColumn; + + /** Creates an instance of FeatureImportanceSettings class. */ + public FeatureImportanceSettings() { + } + + /** + * Get the mode property: The mode of operation for computing feature importance. + * + * @return the mode value. + */ + public FeatureImportanceMode mode() { + return this.mode; + } + + /** + * Set the mode property: The mode of operation for computing feature importance. + * + * @param mode the mode value to set. + * @return the FeatureImportanceSettings object itself. + */ + public FeatureImportanceSettings withMode(FeatureImportanceMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the targetColumn property: The name of the target column within the input data asset. + * + * @return the targetColumn value. + */ + public String targetColumn() { + return this.targetColumn; + } + + /** + * Set the targetColumn property: The name of the target column within the input data asset. + * + * @param targetColumn the targetColumn value to set. + * @return the FeatureImportanceSettings object itself. + */ + public FeatureImportanceSettings withTargetColumn(String targetColumn) { + this.targetColumn = targetColumn; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java new file mode 100644 index 0000000000000..99e39a0932ae3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** DTO object representing feature. */ +@Fluent +public final class FeatureProperties extends ResourceBase { + /* + * Specifies type + */ + @JsonProperty(value = "dataType") + private FeatureDataType dataType; + + /* + * Specifies name + */ + @JsonProperty(value = "featureName") + private String featureName; + + /** Creates an instance of FeatureProperties class. */ + public FeatureProperties() { + } + + /** + * Get the dataType property: Specifies type. + * + * @return the dataType value. + */ + public FeatureDataType dataType() { + return this.dataType; + } + + /** + * Set the dataType property: Specifies type. + * + * @param dataType the dataType value to set. + * @return the FeatureProperties object itself. + */ + public FeatureProperties withDataType(FeatureDataType dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get the featureName property: Specifies name. + * + * @return the featureName value. + */ + public String featureName() { + return this.featureName; + } + + /** + * Set the featureName property: Specifies name. + * + * @param featureName the featureName value to set. + * @return the FeatureProperties object itself. + */ + public FeatureProperties withFeatureName(String featureName) { + this.featureName = featureName; + return this; + } + + /** {@inheritDoc} */ + @Override + public FeatureProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeatureProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeatureProperties 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..3cc7408851cbf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of Feature entities. */ +@Fluent +public final class FeatureResourceArmPaginatedResult { + /* + * The link to the next page of Feature objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type Feature. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of FeatureResourceArmPaginatedResult class. */ + public FeatureResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the FeatureResourceArmPaginatedResult object itself. + */ + public FeatureResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type Feature. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type Feature. + * + * @param value the value value to set. + * @return the FeatureResourceArmPaginatedResult object itself. + */ + public FeatureResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java new file mode 100644 index 0000000000000..b2b924ea39976 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** The FeatureSubset model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "filterType") +@JsonTypeName("FeatureSubset") +@Fluent +public final class FeatureSubset extends MonitoringFeatureFilterBase { + /* + * [Required] The list of features to include. + */ + @JsonProperty(value = "features", required = true) + private List features; + + /** Creates an instance of FeatureSubset class. */ + public FeatureSubset() { + } + + /** + * Get the features property: [Required] The list of features to include. + * + * @return the features value. + */ + public List features() { + return this.features; + } + + /** + * Set the features property: [Required] The list of features to include. + * + * @param features the features value to set. + * @return the FeatureSubset object itself. + */ + public FeatureSubset withFeatures(List features) { + this.features = features; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (features() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property features in model FeatureSubset")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FeatureSubset.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java new file mode 100644 index 0000000000000..27748bf697d3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Specifies the feature window. */ +@Fluent +public final class FeatureWindow { + /* + * Specifies the feature window end time + */ + @JsonProperty(value = "featureWindowEnd") + private OffsetDateTime featureWindowEnd; + + /* + * Specifies the feature window start time + */ + @JsonProperty(value = "featureWindowStart") + private OffsetDateTime featureWindowStart; + + /** Creates an instance of FeatureWindow class. */ + public FeatureWindow() { + } + + /** + * Get the featureWindowEnd property: Specifies the feature window end time. + * + * @return the featureWindowEnd value. + */ + public OffsetDateTime featureWindowEnd() { + return this.featureWindowEnd; + } + + /** + * Set the featureWindowEnd property: Specifies the feature window end time. + * + * @param featureWindowEnd the featureWindowEnd value to set. + * @return the FeatureWindow object itself. + */ + public FeatureWindow withFeatureWindowEnd(OffsetDateTime featureWindowEnd) { + this.featureWindowEnd = featureWindowEnd; + return this; + } + + /** + * Get the featureWindowStart property: Specifies the feature window start time. + * + * @return the featureWindowStart value. + */ + public OffsetDateTime featureWindowStart() { + return this.featureWindowStart; + } + + /** + * Set the featureWindowStart property: Specifies the feature window start time. + * + * @param featureWindowStart the featureWindowStart value to set. + * @return the FeatureWindow object itself. + */ + public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { + this.featureWindowStart = featureWindowStart; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java new file mode 100644 index 0000000000000..942241dd0893f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 Features. */ +public interface Features { + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion); + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Featureset name. This is case-sensitive. + * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String skip, + String tags, + String featureName, + String description, + ListViewType listViewType, + Integer pageSize, + Context context); + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName, + Context context); + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Feature set name. This is case-sensitive. + * @param featuresetVersion Feature set version identifier. This is case-sensitive. + * @param featureName Feature Name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature. + */ + Feature get( + String resourceGroupName, + String workspaceName, + String featuresetName, + String featuresetVersion, + String featureName); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java new file mode 100644 index 0000000000000..5ecba34b69b07 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; + +/** An immutable client-side representation of FeaturesetContainer. */ +public interface FeaturesetContainer { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + FeaturesetContainerProperties 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.machinelearning.fluent.models.FeaturesetContainerInner object. + * + * @return the inner object. + */ + FeaturesetContainerInner innerModel(); + + /** The entirety of the FeaturesetContainer definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + + /** The FeaturesetContainer definition stages. */ + interface DefinitionStages { + /** The first stage of the FeaturesetContainer definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the FeaturesetContainer definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** The stage of the FeaturesetContainer definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(FeaturesetContainerProperties properties); + } + + /** + * The stage of the FeaturesetContainer 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + FeaturesetContainer create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FeaturesetContainer create(Context context); + } + } + + /** + * Begins update for the FeaturesetContainer resource. + * + * @return the stage of resource update. + */ + FeaturesetContainer.Update update(); + + /** The template for FeaturesetContainer update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FeaturesetContainer apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FeaturesetContainer apply(Context context); + } + + /** The FeaturesetContainer update stages. */ + interface UpdateStages { + /** The stage of the FeaturesetContainer update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(FeaturesetContainerProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FeaturesetContainer refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FeaturesetContainer refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java new file mode 100644 index 0000000000000..1298d9716e03a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** DTO object representing feature set. */ +@Fluent +public final class FeaturesetContainerProperties extends AssetContainer { + /* + * Provisioning state for the featureset container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** Creates an instance of FeaturesetContainerProperties class. */ + public FeaturesetContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the featureset container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetContainerProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetContainerProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetContainerProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetContainerProperties 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..29713ce04d4f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of FeaturesetContainer entities. */ +@Fluent +public final class FeaturesetContainerResourceArmPaginatedResult { + /* + * The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type FeaturesetContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of FeaturesetContainerResourceArmPaginatedResult class. */ + public FeaturesetContainerResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no + * additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the FeaturesetContainerResourceArmPaginatedResult object itself. + */ + public FeaturesetContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type FeaturesetContainer. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type FeaturesetContainer. + * + * @param value the value value to set. + * @return the FeaturesetContainerResourceArmPaginatedResult object itself. + */ + public FeaturesetContainerResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java new file mode 100644 index 0000000000000..9a10b56cc231f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.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.machinelearning.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 FeaturesetContainers. */ +public interface FeaturesetContainers { + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + FeaturesetContainer getEntityById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getEntityByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 FeaturesetContainer resource. + * + * @param name resource name. + * @return the first stage of the new FeaturesetContainer definition. + */ + FeaturesetContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java new file mode 100644 index 0000000000000..19ebeecd86ab0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DTO object representing specification. */ +@Fluent +public final class FeaturesetSpecification { + /* + * Specifies the spec path + */ + @JsonProperty(value = "path") + private String path; + + /** Creates an instance of FeaturesetSpecification class. */ + public FeaturesetSpecification() { + } + + /** + * Get the path property: Specifies the spec path. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Specifies the spec path. + * + * @param path the path value to set. + * @return the FeaturesetSpecification object itself. + */ + public FeaturesetSpecification withPath(String path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java new file mode 100644 index 0000000000000..b1a39cc7ac95a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; + +/** An immutable client-side representation of FeaturesetVersion. */ +public interface FeaturesetVersion { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + FeaturesetVersionProperties 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.machinelearning.fluent.models.FeaturesetVersionInner object. + * + * @return the inner object. + */ + FeaturesetVersionInner innerModel(); + + /** The entirety of the FeaturesetVersion definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + + /** The FeaturesetVersion definition stages. */ + interface DefinitionStages { + /** The first stage of the FeaturesetVersion definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the FeaturesetVersion definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @return the next definition stage. + */ + WithProperties withExistingFeatureset(String resourceGroupName, String workspaceName, String name); + } + + /** The stage of the FeaturesetVersion definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(FeaturesetVersionProperties properties); + } + + /** + * The stage of the FeaturesetVersion 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + FeaturesetVersion create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FeaturesetVersion create(Context context); + } + } + + /** + * Begins update for the FeaturesetVersion resource. + * + * @return the stage of resource update. + */ + FeaturesetVersion.Update update(); + + /** The template for FeaturesetVersion update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FeaturesetVersion apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FeaturesetVersion apply(Context context); + } + + /** The FeaturesetVersion update stages. */ + interface UpdateStages { + /** The stage of the FeaturesetVersion update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(FeaturesetVersionProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FeaturesetVersion refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FeaturesetVersion refresh(Context context); + + /** + * Backfill. + * + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body); + + /** + * Backfill. + * + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + FeaturesetVersionBackfillResponse backfill(FeaturesetVersionBackfillRequest body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java new file mode 100644 index 0000000000000..aa464d845e4a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Request payload for creating a backfill request for a given feature set version. */ +@Fluent +public final class FeaturesetVersionBackfillRequest { + /* + * Specified the data availability status that you want to backfill + */ + @JsonProperty(value = "dataAvailabilityStatus") + private List dataAvailabilityStatus; + + /* + * Specifies description + */ + @JsonProperty(value = "description") + private String description; + + /* + * Specifies description + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Specifies the backfill feature window to be materialized + */ + @JsonProperty(value = "featureWindow") + private FeatureWindow featureWindow; + + /* + * Specify the jobId to retry the failed materialization + */ + @JsonProperty(value = "jobId") + private String jobId; + + /* + * Specifies the properties + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Specifies the compute resource settings + */ + @JsonProperty(value = "resource") + private MaterializationComputeResource resource; + + /* + * Specifies the spark compute settings + */ + @JsonProperty(value = "sparkConfiguration") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map sparkConfiguration; + + /* + * Specifies the tags + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of FeaturesetVersionBackfillRequest class. */ + public FeaturesetVersionBackfillRequest() { + } + + /** + * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * + * @return the dataAvailabilityStatus value. + */ + public List dataAvailabilityStatus() { + return this.dataAvailabilityStatus; + } + + /** + * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * + * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withDataAvailabilityStatus( + List dataAvailabilityStatus) { + this.dataAvailabilityStatus = dataAvailabilityStatus; + return this; + } + + /** + * Get the description property: Specifies description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Specifies description. + * + * @param description the description value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the displayName property: Specifies description. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Specifies description. + * + * @param displayName the displayName value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the featureWindow property: Specifies the backfill feature window to be materialized. + * + * @return the featureWindow value. + */ + public FeatureWindow featureWindow() { + return this.featureWindow; + } + + /** + * Set the featureWindow property: Specifies the backfill feature window to be materialized. + * + * @param featureWindow the featureWindow value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { + this.featureWindow = featureWindow; + return this; + } + + /** + * Get the jobId property: Specify the jobId to retry the failed materialization. + * + * @return the jobId value. + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the jobId property: Specify the jobId to retry the failed materialization. + * + * @param jobId the jobId value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Get the properties property: Specifies the properties. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Specifies the properties. + * + * @param properties the properties value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the resource property: Specifies the compute resource settings. + * + * @return the resource value. + */ + public MaterializationComputeResource resource() { + return this.resource; + } + + /** + * Set the resource property: Specifies the compute resource settings. + * + * @param resource the resource value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withResource(MaterializationComputeResource resource) { + this.resource = resource; + return this; + } + + /** + * Get the sparkConfiguration property: Specifies the spark compute settings. + * + * @return the sparkConfiguration value. + */ + public Map sparkConfiguration() { + return this.sparkConfiguration; + } + + /** + * Set the sparkConfiguration property: Specifies the spark compute settings. + * + * @param sparkConfiguration the sparkConfiguration value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withSparkConfiguration(Map sparkConfiguration) { + this.sparkConfiguration = sparkConfiguration; + return this; + } + + /** + * Get the tags property: Specifies the tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Specifies the tags. + * + * @param tags the tags value to set. + * @return the FeaturesetVersionBackfillRequest object itself. + */ + public FeaturesetVersionBackfillRequest withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (featureWindow() != null) { + featureWindow().validate(); + } + if (resource() != null) { + resource().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java new file mode 100644 index 0000000000000..c4e8962beb9eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; +import java.util.List; + +/** An immutable client-side representation of FeaturesetVersionBackfillResponse. */ +public interface FeaturesetVersionBackfillResponse { + /** + * Gets the jobIds property: List of jobs submitted as part of the backfill request. + * + * @return the jobIds value. + */ + List jobIds(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner + * object. + * + * @return the inner object. + */ + FeaturesetVersionBackfillResponseInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java new file mode 100644 index 0000000000000..11c27c9032fe2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** DTO object representing feature set version. */ +@Fluent +public final class FeaturesetVersionProperties extends AssetBase { + /* + * Specifies list of entities + */ + @JsonProperty(value = "entities") + private List entities; + + /* + * Specifies the materialization settings + */ + @JsonProperty(value = "materializationSettings") + private MaterializationSettings materializationSettings; + + /* + * Provisioning state for the featureset version container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /* + * Specifies the feature spec details + */ + @JsonProperty(value = "specification") + private FeaturesetSpecification specification; + + /* + * Specifies the asset stage + */ + @JsonProperty(value = "stage") + private String stage; + + /** Creates an instance of FeaturesetVersionProperties class. */ + public FeaturesetVersionProperties() { + } + + /** + * Get the entities property: Specifies list of entities. + * + * @return the entities value. + */ + public List entities() { + return this.entities; + } + + /** + * Set the entities property: Specifies list of entities. + * + * @param entities the entities value to set. + * @return the FeaturesetVersionProperties object itself. + */ + public FeaturesetVersionProperties withEntities(List entities) { + this.entities = entities; + return this; + } + + /** + * Get the materializationSettings property: Specifies the materialization settings. + * + * @return the materializationSettings value. + */ + public MaterializationSettings materializationSettings() { + return this.materializationSettings; + } + + /** + * Set the materializationSettings property: Specifies the materialization settings. + * + * @param materializationSettings the materializationSettings value to set. + * @return the FeaturesetVersionProperties object itself. + */ + public FeaturesetVersionProperties withMaterializationSettings(MaterializationSettings materializationSettings) { + this.materializationSettings = materializationSettings; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the featureset version container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the specification property: Specifies the feature spec details. + * + * @return the specification value. + */ + public FeaturesetSpecification specification() { + return this.specification; + } + + /** + * Set the specification property: Specifies the feature spec details. + * + * @param specification the specification value to set. + * @return the FeaturesetVersionProperties object itself. + */ + public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { + this.specification = specification; + return this; + } + + /** + * Get the stage property: Specifies the asset stage. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Specifies the asset stage. + * + * @param stage the stage value to set. + * @return the FeaturesetVersionProperties object itself. + */ + public FeaturesetVersionProperties withStage(String stage) { + this.stage = stage; + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetVersionProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetVersionProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturesetVersionProperties 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(); + if (materializationSettings() != null) { + materializationSettings().validate(); + } + if (specification() != null) { + specification().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..05ac0a9e642f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of FeaturesetVersion entities. */ +@Fluent +public final class FeaturesetVersionResourceArmPaginatedResult { + /* + * The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type FeaturesetVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of FeaturesetVersionResourceArmPaginatedResult class. */ + public FeaturesetVersionResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no + * additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the FeaturesetVersionResourceArmPaginatedResult object itself. + */ + public FeaturesetVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type FeaturesetVersion. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type FeaturesetVersion. + * + * @param value the value value to set. + * @return the FeaturesetVersionResourceArmPaginatedResult object itself. + */ + public FeaturesetVersionResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java new file mode 100644 index 0000000000000..4abfb12c293ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 FeaturesetVersions. */ +public interface FeaturesetVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String name); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Featureset name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + FeaturesetVersionBackfillResponse backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body); + + /** + * Backfill. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Feature set version backfill request entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response payload for creating a backfill request for a given feature set version. + */ + FeaturesetVersionBackfillResponse backfill( + String resourceGroupName, + String workspaceName, + String name, + String version, + FeaturesetVersionBackfillRequest body, + Context context); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + FeaturesetVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 FeaturesetVersion resource. + * + * @param name resource name. + * @return the first stage of the new FeaturesetVersion definition. + */ + FeaturesetVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java new file mode 100644 index 0000000000000..c7ea18bbe1407 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; + +/** An immutable client-side representation of FeaturestoreEntityContainer. */ +public interface FeaturestoreEntityContainer { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + FeaturestoreEntityContainerProperties 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.machinelearning.fluent.models.FeaturestoreEntityContainerInner object. + * + * @return the inner object. + */ + FeaturestoreEntityContainerInner innerModel(); + + /** The entirety of the FeaturestoreEntityContainer definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + + /** The FeaturestoreEntityContainer definition stages. */ + interface DefinitionStages { + /** The first stage of the FeaturestoreEntityContainer definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the FeaturestoreEntityContainer definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** The stage of the FeaturestoreEntityContainer definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(FeaturestoreEntityContainerProperties properties); + } + + /** + * The stage of the FeaturestoreEntityContainer 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + FeaturestoreEntityContainer create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FeaturestoreEntityContainer create(Context context); + } + } + + /** + * Begins update for the FeaturestoreEntityContainer resource. + * + * @return the stage of resource update. + */ + FeaturestoreEntityContainer.Update update(); + + /** The template for FeaturestoreEntityContainer update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FeaturestoreEntityContainer apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FeaturestoreEntityContainer apply(Context context); + } + + /** The FeaturestoreEntityContainer update stages. */ + interface UpdateStages { + /** The stage of the FeaturestoreEntityContainer update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(FeaturestoreEntityContainerProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FeaturestoreEntityContainer refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FeaturestoreEntityContainer refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java new file mode 100644 index 0000000000000..85b76ea502064 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** DTO object representing feature entity. */ +@Fluent +public final class FeaturestoreEntityContainerProperties extends AssetContainer { + /* + * Provisioning state for the featurestore entity container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /** Creates an instance of FeaturestoreEntityContainerProperties class. */ + public FeaturestoreEntityContainerProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the featurestore entity container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityContainerProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityContainerProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityContainerProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityContainerProperties 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..301680ec6bae7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of FeaturestoreEntityContainer entities. */ +@Fluent +public final class FeaturestoreEntityContainerResourceArmPaginatedResult { + /* + * The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type FeaturestoreEntityContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of FeaturestoreEntityContainerResourceArmPaginatedResult class. */ + public FeaturestoreEntityContainerResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are + * no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are + * no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. + */ + public FeaturestoreEntityContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type FeaturestoreEntityContainer. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type FeaturestoreEntityContainer. + * + * @param value the value value to set. + * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. + */ + public FeaturestoreEntityContainerResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java new file mode 100644 index 0000000000000..3eb9cd2dc050b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 FeaturestoreEntityContainers. */ +public interface FeaturestoreEntityContainers { + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List featurestore entity containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String name, + String description, + String createdBy, + Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getEntityWithResponse( + String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + FeaturestoreEntityContainer getEntityById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getEntityByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 FeaturestoreEntityContainer resource. + * + * @param name resource name. + * @return the first stage of the new FeaturestoreEntityContainer definition. + */ + FeaturestoreEntityContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java new file mode 100644 index 0000000000000..dde6c4f8200b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; + +/** An immutable client-side representation of FeaturestoreEntityVersion. */ +public interface FeaturestoreEntityVersion { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + FeaturestoreEntityVersionProperties 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.machinelearning.fluent.models.FeaturestoreEntityVersionInner object. + * + * @return the inner object. + */ + FeaturestoreEntityVersionInner innerModel(); + + /** The entirety of the FeaturestoreEntityVersion definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + + /** The FeaturestoreEntityVersion definition stages. */ + interface DefinitionStages { + /** The first stage of the FeaturestoreEntityVersion definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the FeaturestoreEntityVersion definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @return the next definition stage. + */ + WithProperties withExistingFeaturestoreEntity(String resourceGroupName, String workspaceName, String name); + } + + /** The stage of the FeaturestoreEntityVersion definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(FeaturestoreEntityVersionProperties properties); + } + + /** + * The stage of the FeaturestoreEntityVersion 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + FeaturestoreEntityVersion create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FeaturestoreEntityVersion create(Context context); + } + } + + /** + * Begins update for the FeaturestoreEntityVersion resource. + * + * @return the stage of resource update. + */ + FeaturestoreEntityVersion.Update update(); + + /** The template for FeaturestoreEntityVersion update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + FeaturestoreEntityVersion apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + FeaturestoreEntityVersion apply(Context context); + } + + /** The FeaturestoreEntityVersion update stages. */ + interface UpdateStages { + /** The stage of the FeaturestoreEntityVersion update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(FeaturestoreEntityVersionProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FeaturestoreEntityVersion refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FeaturestoreEntityVersion refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java new file mode 100644 index 0000000000000..d4b9f78f526e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** DTO object representing feature entity version. */ +@Fluent +public final class FeaturestoreEntityVersionProperties extends AssetBase { + /* + * Specifies index columns + */ + @JsonProperty(value = "indexColumns") + private List indexColumns; + + /* + * Provisioning state for the featurestore entity version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /* + * Specifies the asset stage + */ + @JsonProperty(value = "stage") + private String stage; + + /** Creates an instance of FeaturestoreEntityVersionProperties class. */ + public FeaturestoreEntityVersionProperties() { + } + + /** + * Get the indexColumns property: Specifies index columns. + * + * @return the indexColumns value. + */ + public List indexColumns() { + return this.indexColumns; + } + + /** + * Set the indexColumns property: Specifies index columns. + * + * @param indexColumns the indexColumns value to set. + * @return the FeaturestoreEntityVersionProperties object itself. + */ + public FeaturestoreEntityVersionProperties withIndexColumns(List indexColumns) { + this.indexColumns = indexColumns; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the featurestore entity version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the stage property: Specifies the asset stage. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Specifies the asset stage. + * + * @param stage the stage value to set. + * @return the FeaturestoreEntityVersionProperties object itself. + */ + public FeaturestoreEntityVersionProperties withStage(String stage) { + this.stage = stage; + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityVersionProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityVersionProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public FeaturestoreEntityVersionProperties 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(); + if (indexColumns() != null) { + indexColumns().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..5e58d211929a1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of FeaturestoreEntityVersion entities. */ +@Fluent +public final class FeaturestoreEntityVersionResourceArmPaginatedResult { + /* + * The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type FeaturestoreEntityVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of FeaturestoreEntityVersionResourceArmPaginatedResult class. */ + public FeaturestoreEntityVersionResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no + * additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. + */ + public FeaturestoreEntityVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type FeaturestoreEntityVersion. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type FeaturestoreEntityVersion. + * + * @param value the value value to set. + * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. + */ + public FeaturestoreEntityVersionResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java new file mode 100644 index 0000000000000..ac88a153c50ed --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 FeaturestoreEntityVersions. */ +public interface FeaturestoreEntityVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String name); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Feature entity name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + String skip, + String tags, + ListViewType listViewType, + Integer pageSize, + String versionName, + String version, + String description, + String createdBy, + String stage, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + FeaturestoreEntityVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 FeaturestoreEntityVersion resource. + * + * @param name resource name. + * @return the first stage of the new FeaturestoreEntityVersion definition. + */ + FeaturestoreEntityVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java new file mode 100644 index 0000000000000..d9fa247d681b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** Fixed input data definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputDataType") +@JsonTypeName("Fixed") +@Fluent +public final class FixedInputData extends MonitoringInputDataBase { + /** Creates an instance of FixedInputData class. */ + public FixedInputData() { + } + + /** {@inheritDoc} */ + @Override + public FixedInputData withColumns(Map columns) { + super.withColumns(columns); + return this; + } + + /** {@inheritDoc} */ + @Override + public FixedInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); + return this; + } + + /** {@inheritDoc} */ + @Override + public FixedInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); + return this; + } + + /** {@inheritDoc} */ + @Override + public FixedInputData withUri(String uri) { + super.withUri(uri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java index b611d6da822aa..7b0af410c19ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java @@ -61,7 +61,7 @@ public final class ForecastingSettings { /* * The function to be used to aggregate the time series target column to conform to a user specified frequency. * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". + * The possible target aggregation functions are: "sum", "max", "min"\ and "mean". */ @JsonProperty(value = "targetAggregateFunction") private TargetAggregationFunction targetAggregateFunction; @@ -255,8 +255,8 @@ public ForecastingSettings withShortSeriesHandlingConfig( /** * Get the targetAggregateFunction property: The function to be used to aggregate the time series target column to * conform to a user specified frequency. If the TargetAggregateFunction is set i.e. not 'None', but the freq - * parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and - * "mean". + * parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min"\ + * and "mean". * * @return the targetAggregateFunction value. */ @@ -267,8 +267,8 @@ public TargetAggregationFunction targetAggregateFunction() { /** * Set the targetAggregateFunction property: The function to be used to aggregate the time series target column to * conform to a user specified frequency. If the TargetAggregateFunction is set i.e. not 'None', but the freq - * parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and - * "mean". + * parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min"\ + * and "mean". * * @param targetAggregateFunction the targetAggregateFunction value to set. * @return the ForecastingSettings object itself. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java new file mode 100644 index 0000000000000..16d46830ce1c1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** FQDN Outbound Rule for the managed network of a machine learning workspace. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("FQDN") +@Fluent +public final class FqdnOutboundRule extends OutboundRule { + /* + * The destination property. + */ + @JsonProperty(value = "destination") + private String destination; + + /** Creates an instance of FqdnOutboundRule class. */ + public FqdnOutboundRule() { + } + + /** + * Get the destination property: The destination property. + * + * @return the destination value. + */ + public String destination() { + return this.destination; + } + + /** + * Set the destination property: The destination property. + * + * @param destination the destination value to set. + * @return the FqdnOutboundRule object itself. + */ + public FqdnOutboundRule withDestination(String destination) { + this.destination = destination; + return this; + } + + /** {@inheritDoc} */ + @Override + public FqdnOutboundRule withCategory(RuleCategory category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public FqdnOutboundRule withStatus(RuleStatus status) { + super.withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java new file mode 100644 index 0000000000000..b2131f0c7973a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GetBlobReferenceForConsumptionDto model. */ +@Fluent +public final class GetBlobReferenceForConsumptionDto { + /* + * Blob uri, example: https://blob.windows.core.net/Container/Path + */ + @JsonProperty(value = "blobUri") + private String blobUri; + + /* + * Credential info to access storage account + */ + @JsonProperty(value = "credential") + private DataReferenceCredential credential; + + /* + * The ARM id of the storage account + */ + @JsonProperty(value = "storageAccountArmId") + private String storageAccountArmId; + + /** Creates an instance of GetBlobReferenceForConsumptionDto class. */ + public GetBlobReferenceForConsumptionDto() { + } + + /** + * Get the blobUri property: Blob uri, example: https://blob.windows.core.net/Container/Path. + * + * @return the blobUri value. + */ + public String blobUri() { + return this.blobUri; + } + + /** + * Set the blobUri property: Blob uri, example: https://blob.windows.core.net/Container/Path. + * + * @param blobUri the blobUri value to set. + * @return the GetBlobReferenceForConsumptionDto object itself. + */ + public GetBlobReferenceForConsumptionDto withBlobUri(String blobUri) { + this.blobUri = blobUri; + return this; + } + + /** + * Get the credential property: Credential info to access storage account. + * + * @return the credential value. + */ + public DataReferenceCredential credential() { + return this.credential; + } + + /** + * Set the credential property: Credential info to access storage account. + * + * @param credential the credential value to set. + * @return the GetBlobReferenceForConsumptionDto object itself. + */ + public GetBlobReferenceForConsumptionDto withCredential(DataReferenceCredential credential) { + this.credential = credential; + return this; + } + + /** + * Get the storageAccountArmId property: The ARM id of the storage account. + * + * @return the storageAccountArmId value. + */ + public String storageAccountArmId() { + return this.storageAccountArmId; + } + + /** + * Set the storageAccountArmId property: The ARM id of the storage account. + * + * @param storageAccountArmId the storageAccountArmId value to set. + * @return the GetBlobReferenceForConsumptionDto object itself. + */ + public GetBlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { + this.storageAccountArmId = storageAccountArmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (credential() != null) { + credential().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java new file mode 100644 index 0000000000000..6820324f746bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** BlobReferenceSASRequest for getBlobReferenceSAS API. */ +@Fluent +public final class GetBlobReferenceSasRequestDto { + /* + * Id of the asset to be accessed + */ + @JsonProperty(value = "assetId") + private String assetId; + + /* + * Blob uri of the asset to be accessed + */ + @JsonProperty(value = "blobUri") + private String blobUri; + + /** Creates an instance of GetBlobReferenceSasRequestDto class. */ + public GetBlobReferenceSasRequestDto() { + } + + /** + * Get the assetId property: Id of the asset to be accessed. + * + * @return the assetId value. + */ + public String assetId() { + return this.assetId; + } + + /** + * Set the assetId property: Id of the asset to be accessed. + * + * @param assetId the assetId value to set. + * @return the GetBlobReferenceSasRequestDto object itself. + */ + public GetBlobReferenceSasRequestDto withAssetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get the blobUri property: Blob uri of the asset to be accessed. + * + * @return the blobUri value. + */ + public String blobUri() { + return this.blobUri; + } + + /** + * Set the blobUri property: Blob uri of the asset to be accessed. + * + * @param blobUri the blobUri value to set. + * @return the GetBlobReferenceSasRequestDto object itself. + */ + public GetBlobReferenceSasRequestDto withBlobUri(String blobUri) { + this.blobUri = blobUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java new file mode 100644 index 0000000000000..d02a57070f4d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner; + +/** An immutable client-side representation of GetBlobReferenceSasResponseDto. */ +public interface GetBlobReferenceSasResponseDto { + /** + * Gets the blobReferenceForConsumption property: Blob reference for consumption details. + * + * @return the blobReferenceForConsumption value. + */ + GetBlobReferenceForConsumptionDto blobReferenceForConsumption(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner + * object. + * + * @return the inner object. + */ + GetBlobReferenceSasResponseDtoInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java new file mode 100644 index 0000000000000..8fdcb99c7c758 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; + +/** Describes the Image Specifications. */ +@Fluent +public final class Image { + /* + * Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + */ + @JsonProperty(value = "type") + private ImageType type; + + /* + * Image reference + */ + @JsonProperty(value = "reference") + private String reference; + + /* + * Describes the Image Specifications + */ + @JsonIgnore private Map additionalProperties; + + /** Creates an instance of Image class. */ + public Image() { + } + + /** + * Get the type property: Type of the image + * + *

Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + * + * @return the type value. + */ + public ImageType type() { + return this.type; + } + + /** + * Set the type property: Type of the image + * + *

Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + * + * @param type the type value to set. + * @return the Image object itself. + */ + public Image withType(ImageType type) { + this.type = type; + return this; + } + + /** + * Get the reference property: Image reference. + * + * @return the reference value. + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference property: Image reference. + * + * @param reference the reference value to set. + * @return the Image object itself. + */ + public Image withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get the additionalProperties property: Describes the Image Specifications. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Describes the Image Specifications. + * + * @param additionalProperties the additionalProperties value to set. + * @return the Image object itself. + */ + public Image withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + @JsonAnySetter + void withAdditionalProperties(String key, Object value) { + if (additionalProperties == null) { + additionalProperties = new HashMap<>(); + } + additionalProperties.put(key, value); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java new file mode 100644 index 0000000000000..ce8a78506769b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Returns metadata about the operating system image for this compute instance. */ +@Fluent +public final class ImageMetadata { + /* + * Specifies the current operating system image version this compute instance is running on. + */ + @JsonProperty(value = "currentImageVersion") + private String currentImageVersion; + + /* + * Specifies the latest available operating system image version. + */ + @JsonProperty(value = "latestImageVersion") + private String latestImageVersion; + + /* + * Specifies whether this compute instance is running on the latest operating system image. + */ + @JsonProperty(value = "isLatestOsImageVersion") + private Boolean isLatestOsImageVersion; + + /** Creates an instance of ImageMetadata class. */ + public ImageMetadata() { + } + + /** + * Get the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @return the currentImageVersion value. + */ + public String currentImageVersion() { + return this.currentImageVersion; + } + + /** + * Set the currentImageVersion property: Specifies the current operating system image version this compute instance + * is running on. + * + * @param currentImageVersion the currentImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withCurrentImageVersion(String currentImageVersion) { + this.currentImageVersion = currentImageVersion; + return this; + } + + /** + * Get the latestImageVersion property: Specifies the latest available operating system image version. + * + * @return the latestImageVersion value. + */ + public String latestImageVersion() { + return this.latestImageVersion; + } + + /** + * Set the latestImageVersion property: Specifies the latest available operating system image version. + * + * @param latestImageVersion the latestImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withLatestImageVersion(String latestImageVersion) { + this.latestImageVersion = latestImageVersion; + return this; + } + + /** + * Get the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @return the isLatestOsImageVersion value. + */ + public Boolean isLatestOsImageVersion() { + return this.isLatestOsImageVersion; + } + + /** + * Set the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest + * operating system image. + * + * @param isLatestOsImageVersion the isLatestOsImageVersion value to set. + * @return the ImageMetadata object itself. + */ + public ImageMetadata withIsLatestOsImageVersion(Boolean isLatestOsImageVersion) { + this.isLatestOsImageVersion = isLatestOsImageVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java index 968ea07751a86..cd620256dc849 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java @@ -8,11 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></example> All distributions can be specified as distribution_name(min, max) or choice(val1, - * val2, ..., valn) where distribution name can be: uniform, quniform, loguniform, etc For more details on how to - * compose distribution expressions please check the documentation: + * Distribution expressions to sweep over values of model settings. <example> Some examples are: ``` ModelName = + * "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, 2)"; + * ```</example> All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., + * valn) where distribution name can be: uniform, quniform, loguniform, etc For more details on how to compose + * distribution expressions please check the documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the * available settings please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java index 5615072d44375..2deffd4fbea09 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java @@ -8,11 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></example> For more details on how to compose distribution expressions please check the - * documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more - * information on the available settings please visit the official documentation: + * Distribution expressions to sweep over values of model settings. <example> Some examples are: ``` ModelName = + * "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, 2)"; + * ```</example> For more details on how to compose distribution expressions please check the documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the + * available settings please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. */ @Fluent diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java index 20c36d838c766..b681b502dbfbf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java @@ -8,11 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></example> For more details on how to compose distribution expressions please check the - * documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more - * information on the available settings please visit the official documentation: + * Distribution expressions to sweep over values of model settings. <example> Some examples are: ``` ModelName = + * "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, 2)"; + * ```</example> For more details on how to compose distribution expressions please check the documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the + * available settings please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. */ @Fluent diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java new file mode 100644 index 0000000000000..06f62fc11ed0c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of the image + * + *

Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + */ +public final class ImageType extends ExpandableStringEnum { + /** Static value docker for ImageType. */ + public static final ImageType DOCKER = fromString("docker"); + + /** Static value azureml for ImageType. */ + public static final ImageType AZUREML = fromString("azureml"); + + /** + * Creates a new instance of ImageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImageType() { + } + + /** + * Creates or finds a ImageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageType. + */ + @JsonCreator + public static ImageType fromString(String name) { + return fromString(name, ImageType.class); + } + + /** + * Gets known ImageType values. + * + * @return known ImageType values. + */ + public static Collection values() { + return values(ImageType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java new file mode 100644 index 0000000000000..f195252147f5b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DTO object representing index column. */ +@Fluent +public final class IndexColumn { + /* + * Specifies the column name + */ + @JsonProperty(value = "columnName") + private String columnName; + + /* + * Specifies the data type + */ + @JsonProperty(value = "dataType") + private FeatureDataType dataType; + + /** Creates an instance of IndexColumn class. */ + public IndexColumn() { + } + + /** + * Get the columnName property: Specifies the column name. + * + * @return the columnName value. + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the columnName property: Specifies the column name. + * + * @param columnName the columnName value to set. + * @return the IndexColumn object itself. + */ + public IndexColumn withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get the dataType property: Specifies the data type. + * + * @return the dataType value. + */ + public FeatureDataType dataType() { + return this.dataType; + } + + /** + * Set the dataType property: Specifies the data type. + * + * @param dataType the dataType value to set. + * @return the IndexColumn object itself. + */ + public IndexColumn withDataType(FeatureDataType dataType) { + this.dataType = dataType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java new file mode 100644 index 0000000000000..2c23feede93aa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Isolation mode for the managed network of a machine learning workspace. */ +public final class IsolationMode extends ExpandableStringEnum { + /** Static value Disabled for IsolationMode. */ + public static final IsolationMode DISABLED = fromString("Disabled"); + + /** Static value AllowInternetOutbound for IsolationMode. */ + public static final IsolationMode ALLOW_INTERNET_OUTBOUND = fromString("AllowInternetOutbound"); + + /** Static value AllowOnlyApprovedOutbound for IsolationMode. */ + public static final IsolationMode ALLOW_ONLY_APPROVED_OUTBOUND = fromString("AllowOnlyApprovedOutbound"); + + /** + * Creates a new instance of IsolationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsolationMode() { + } + + /** + * Creates or finds a IsolationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsolationMode. + */ + @JsonCreator + public static IsolationMode fromString(String name) { + return fromString(name, IsolationMode.class); + } + + /** + * Gets known IsolationMode values. + * + * @return known IsolationMode values. + */ + public static Collection values() { + return values(IsolationMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java index 3e18abd293bd0..7748361678719 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java @@ -66,11 +66,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The JobBase definition stages. */ interface DefinitionStages { /** The first stage of the JobBase definition. */ interface Blank extends WithParentResource { } + /** The stage of the JobBase definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -82,6 +84,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the JobBase definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(JobBaseProperties properties); } + /** * The stage of the JobBase 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. @@ -113,6 +117,7 @@ interface WithCreate { JobBase create(Context context); } } + /** * Begins update for the JobBase resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ JobBase apply(Context context); } + /** The JobBase update stages. */ interface UpdateStages { /** The stage of the JobBase update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(JobBaseProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java index a581c73835ad3..732c33bd00dd3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java @@ -30,6 +30,13 @@ public final class JobService { @JsonProperty(value = "jobServiceType") private String jobServiceType; + /* + * Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. + */ + @JsonProperty(value = "nodes") + private Nodes nodes; + /* * Port for endpoint. */ @@ -102,6 +109,28 @@ public JobService withJobServiceType(String jobServiceType) { return this; } + /** + * Get the nodes property: Nodes that user would like to start the service on. If Nodes is not set or set to null, + * the service will only be started on leader node. + * + * @return the nodes value. + */ + public Nodes nodes() { + return this.nodes; + } + + /** + * Set the nodes property: Nodes that user would like to start the service on. If Nodes is not set or set to null, + * the service will only be started on leader node. + * + * @param nodes the nodes value to set. + * @return the JobService object itself. + */ + public JobService withNodes(Nodes nodes) { + this.nodes = nodes; + return this; + } + /** * Get the port property: Port for endpoint. * @@ -157,5 +186,8 @@ public String status() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (nodes() != null) { + nodes().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java new file mode 100644 index 0000000000000..c5910ee4250b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to determine the job tier. */ +public final class JobTier extends ExpandableStringEnum { + /** Static value Null for JobTier. */ + public static final JobTier NULL = fromString("Null"); + + /** Static value Spot for JobTier. */ + public static final JobTier SPOT = fromString("Spot"); + + /** Static value Basic for JobTier. */ + public static final JobTier BASIC = fromString("Basic"); + + /** Static value Standard for JobTier. */ + public static final JobTier STANDARD = fromString("Standard"); + + /** Static value Premium for JobTier. */ + public static final JobTier PREMIUM = fromString("Premium"); + + /** + * Creates a new instance of JobTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobTier() { + } + + /** + * Creates or finds a JobTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobTier. + */ + @JsonCreator + public static JobTier fromString(String name) { + return fromString(name, JobTier.class); + } + + /** + * Gets known JobTier values. + * + * @return known JobTier values. + */ + public static Collection values() { + return values(JobTier.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java index cba708d43905e..98b4252041ecc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java @@ -31,6 +31,8 @@ public interface Jobs { * @param jobType Type of job to be returned. * @param tag Jobs returned will have this tag key. * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -44,6 +46,7 @@ PagedIterable list( String jobType, String tag, ListViewType listViewType, + String properties, Context context); /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java new file mode 100644 index 0000000000000..bbb44b2489ef0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Managed compute identity definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeIdentityType") +@JsonTypeName("ManagedIdentity") +@Fluent +public final class ManagedComputeIdentity extends MonitorComputeIdentityBase { + /* + * The identity which will be leveraged by the monitoring jobs. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** Creates an instance of ManagedComputeIdentity class. */ + public ManagedComputeIdentity() { + } + + /** + * Get the identity property: The identity which will be leveraged by the monitoring jobs. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity which will be leveraged by the monitoring jobs. + * + * @param identity the identity value to set. + * @return the ManagedComputeIdentity object itself. + */ + public ManagedComputeIdentity withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java index 6ff0f7e2b121d..8b943be0e5b3d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java @@ -14,7 +14,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") @JsonTypeName("Managed") @Fluent -public class ManagedIdentity extends IdentityConfiguration { +public final class ManagedIdentity extends IdentityConfiguration { /* * Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java new file mode 100644 index 0000000000000..83450d084684e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Credential for user managed identity. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialType") +@JsonTypeName("ManagedIdentity") +@Fluent +public final class ManagedIdentityCredential extends DataReferenceCredential { + /* + * ManagedIdentityCredential identity type + */ + @JsonProperty(value = "managedIdentityType") + private String managedIdentityType; + + /* + * ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + */ + @JsonProperty(value = "userManagedIdentityClientId") + private String userManagedIdentityClientId; + + /* + * PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + */ + @JsonProperty(value = "userManagedIdentityPrincipalId") + private String userManagedIdentityPrincipalId; + + /* + * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + */ + @JsonProperty(value = "userManagedIdentityResourceId") + private String userManagedIdentityResourceId; + + /* + * TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + */ + @JsonProperty(value = "userManagedIdentityTenantId") + private String userManagedIdentityTenantId; + + /** Creates an instance of ManagedIdentityCredential class. */ + public ManagedIdentityCredential() { + } + + /** + * Get the managedIdentityType property: ManagedIdentityCredential identity type. + * + * @return the managedIdentityType value. + */ + public String managedIdentityType() { + return this.managedIdentityType; + } + + /** + * Set the managedIdentityType property: ManagedIdentityCredential identity type. + * + * @param managedIdentityType the managedIdentityType value to set. + * @return the ManagedIdentityCredential object itself. + */ + public ManagedIdentityCredential withManagedIdentityType(String managedIdentityType) { + this.managedIdentityType = managedIdentityType; + return this; + } + + /** + * Get the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, + * this field is null. + * + * @return the userManagedIdentityClientId value. + */ + public String userManagedIdentityClientId() { + return this.userManagedIdentityClientId; + } + + /** + * Set the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, + * this field is null. + * + * @param userManagedIdentityClientId the userManagedIdentityClientId value to set. + * @return the ManagedIdentityCredential object itself. + */ + public ManagedIdentityCredential withUserManagedIdentityClientId(String userManagedIdentityClientId) { + this.userManagedIdentityClientId = userManagedIdentityClientId; + return this; + } + + /** + * Get the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = + * SystemManaged, this field is null. + * + * @return the userManagedIdentityPrincipalId value. + */ + public String userManagedIdentityPrincipalId() { + return this.userManagedIdentityPrincipalId; + } + + /** + * Set the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = + * SystemManaged, this field is null. + * + * @param userManagedIdentityPrincipalId the userManagedIdentityPrincipalId value to set. + * @return the ManagedIdentityCredential object itself. + */ + public ManagedIdentityCredential withUserManagedIdentityPrincipalId(String userManagedIdentityPrincipalId) { + this.userManagedIdentityPrincipalId = userManagedIdentityPrincipalId; + return this; + } + + /** + * Get the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = + * SystemManaged, this field is null. + * + * @return the userManagedIdentityResourceId value. + */ + public String userManagedIdentityResourceId() { + return this.userManagedIdentityResourceId; + } + + /** + * Set the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = + * SystemManaged, this field is null. + * + * @param userManagedIdentityResourceId the userManagedIdentityResourceId value to set. + * @return the ManagedIdentityCredential object itself. + */ + public ManagedIdentityCredential withUserManagedIdentityResourceId(String userManagedIdentityResourceId) { + this.userManagedIdentityResourceId = userManagedIdentityResourceId; + return this; + } + + /** + * Get the userManagedIdentityTenantId property: TenantId for the UAMI. For ManagedIdentityType = SystemManaged, + * this field is null. + * + * @return the userManagedIdentityTenantId value. + */ + public String userManagedIdentityTenantId() { + return this.userManagedIdentityTenantId; + } + + /** + * Set the userManagedIdentityTenantId property: TenantId for the UAMI. For ManagedIdentityType = SystemManaged, + * this field is null. + * + * @param userManagedIdentityTenantId the userManagedIdentityTenantId value to set. + * @return the ManagedIdentityCredential object itself. + */ + public ManagedIdentityCredential withUserManagedIdentityTenantId(String userManagedIdentityTenantId) { + this.userManagedIdentityTenantId = userManagedIdentityTenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java new file mode 100644 index 0000000000000..2c2f624159115 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Managed Network Provisioning options for managed network of a machine learning workspace. */ +@Fluent +public final class ManagedNetworkProvisionOptions { + /* + * The includeSpark property. + */ + @JsonProperty(value = "includeSpark") + private Boolean includeSpark; + + /** Creates an instance of ManagedNetworkProvisionOptions class. */ + public ManagedNetworkProvisionOptions() { + } + + /** + * Get the includeSpark property: The includeSpark property. + * + * @return the includeSpark value. + */ + public Boolean includeSpark() { + return this.includeSpark; + } + + /** + * Set the includeSpark property: The includeSpark property. + * + * @param includeSpark the includeSpark value to set. + * @return the ManagedNetworkProvisionOptions object itself. + */ + public ManagedNetworkProvisionOptions withIncludeSpark(Boolean includeSpark) { + this.includeSpark = includeSpark; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java new file mode 100644 index 0000000000000..b658d74d8ab48 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; + +/** An immutable client-side representation of ManagedNetworkProvisionStatus. */ +public interface ManagedNetworkProvisionStatus { + /** + * Gets the sparkReady property: The sparkReady property. + * + * @return the sparkReady value. + */ + Boolean sparkReady(); + + /** + * Gets the status property: Status for the managed network of a machine learning workspace. + * + * @return the status value. + */ + ManagedNetworkStatus status(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner object. + * + * @return the inner object. + */ + ManagedNetworkProvisionStatusInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java new file mode 100644 index 0000000000000..260d2d0d03d74 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.Context; + +/** Resource collection API of ManagedNetworkProvisions. */ +public interface ManagedNetworkProvisions { + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + ManagedNetworkProvisionStatus provisionManagedNetwork(String resourceGroupName, String workspaceName); + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace. + */ + ManagedNetworkProvisionStatus provisionManagedNetwork( + String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java new file mode 100644 index 0000000000000..4e2c09a51e552 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import java.util.Map; + +/** An immutable client-side representation of ManagedNetworkSettings. */ +public interface ManagedNetworkSettings { + /** + * Gets the isolationMode property: Isolation mode for the managed network of a machine learning workspace. + * + * @return the isolationMode value. + */ + IsolationMode isolationMode(); + + /** + * Gets the networkId property: The networkId property. + * + * @return the networkId value. + */ + String networkId(); + + /** + * Gets the outboundRules property: Dictionary of <OutboundRule>. + * + * @return the outboundRules value. + */ + Map outboundRules(); + + /** + * Gets the status property: Status of the Provisioning for the managed network of a machine learning workspace. + * + * @return the status value. + */ + ManagedNetworkProvisionStatus status(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner object. + * + * @return the inner object. + */ + ManagedNetworkSettingsInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java new file mode 100644 index 0000000000000..4de1d6fc87b3d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ManagedNetworkSettingsRules. */ +public interface ManagedNetworkSettingsRules { + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists the managed network outbound rules for a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 outbound rules for the managed network of a machine learning workspace as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String ruleName); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleName, Context context); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an outbound rule from the managed network of a machine learning workspace. + */ + OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + */ + OutboundRuleBasicResource getById(String id); + + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + * + * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @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); + + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + * + * @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 OutboundRuleBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new OutboundRuleBasicResource definition. + */ + OutboundRuleBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java new file mode 100644 index 0000000000000..fa8e2640625f2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Status for the managed network of a machine learning workspace. */ +public final class ManagedNetworkStatus extends ExpandableStringEnum { + /** Static value Inactive for ManagedNetworkStatus. */ + public static final ManagedNetworkStatus INACTIVE = fromString("Inactive"); + + /** Static value Active for ManagedNetworkStatus. */ + public static final ManagedNetworkStatus ACTIVE = fromString("Active"); + + /** + * Creates a new instance of ManagedNetworkStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedNetworkStatus() { + } + + /** + * Creates or finds a ManagedNetworkStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedNetworkStatus. + */ + @JsonCreator + public static ManagedNetworkStatus fromString(String name) { + return fromString(name, ManagedNetworkStatus.class); + } + + /** + * Gets known ManagedNetworkStatus values. + * + * @return known ManagedNetworkStatus values. + */ + public static Collection values() { + return values(ManagedNetworkStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java new file mode 100644 index 0000000000000..fb2a84214bb99 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DTO object representing compute resource. */ +@Fluent +public final class MaterializationComputeResource { + /* + * Specifies the instance type + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /** Creates an instance of MaterializationComputeResource class. */ + public MaterializationComputeResource() { + } + + /** + * Get the instanceType property: Specifies the instance type. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: Specifies the instance type. + * + * @param instanceType the instanceType value to set. + * @return the MaterializationComputeResource object itself. + */ + public MaterializationComputeResource withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java new file mode 100644 index 0000000000000..86d88fb8660c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The MaterializationSettings model. */ +@Fluent +public final class MaterializationSettings { + /* + * Specifies the notification details + */ + @JsonProperty(value = "notification") + private NotificationSetting notification; + + /* + * Specifies the compute resource settings + */ + @JsonProperty(value = "resource") + private MaterializationComputeResource resource; + + /* + * Specifies the schedule details + */ + @JsonProperty(value = "schedule") + private RecurrenceTrigger schedule; + + /* + * Specifies the spark compute settings + */ + @JsonProperty(value = "sparkConfiguration") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map sparkConfiguration; + + /* + * Specifies the stores to which materialization should happen + */ + @JsonProperty(value = "storeType") + private MaterializationStoreType storeType; + + /** Creates an instance of MaterializationSettings class. */ + public MaterializationSettings() { + } + + /** + * Get the notification property: Specifies the notification details. + * + * @return the notification value. + */ + public NotificationSetting notification() { + return this.notification; + } + + /** + * Set the notification property: Specifies the notification details. + * + * @param notification the notification value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withNotification(NotificationSetting notification) { + this.notification = notification; + return this; + } + + /** + * Get the resource property: Specifies the compute resource settings. + * + * @return the resource value. + */ + public MaterializationComputeResource resource() { + return this.resource; + } + + /** + * Set the resource property: Specifies the compute resource settings. + * + * @param resource the resource value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withResource(MaterializationComputeResource resource) { + this.resource = resource; + return this; + } + + /** + * Get the schedule property: Specifies the schedule details. + * + * @return the schedule value. + */ + public RecurrenceTrigger schedule() { + return this.schedule; + } + + /** + * Set the schedule property: Specifies the schedule details. + * + * @param schedule the schedule value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withSchedule(RecurrenceTrigger schedule) { + this.schedule = schedule; + return this; + } + + /** + * Get the sparkConfiguration property: Specifies the spark compute settings. + * + * @return the sparkConfiguration value. + */ + public Map sparkConfiguration() { + return this.sparkConfiguration; + } + + /** + * Set the sparkConfiguration property: Specifies the spark compute settings. + * + * @param sparkConfiguration the sparkConfiguration value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withSparkConfiguration(Map sparkConfiguration) { + this.sparkConfiguration = sparkConfiguration; + return this; + } + + /** + * Get the storeType property: Specifies the stores to which materialization should happen. + * + * @return the storeType value. + */ + public MaterializationStoreType storeType() { + return this.storeType; + } + + /** + * Set the storeType property: Specifies the stores to which materialization should happen. + * + * @param storeType the storeType value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withStoreType(MaterializationStoreType storeType) { + this.storeType = storeType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (notification() != null) { + notification().validate(); + } + if (resource() != null) { + resource().validate(); + } + if (schedule() != null) { + schedule().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java new file mode 100644 index 0000000000000..dd37de51ae375 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MaterializationStoreType. */ +public final class MaterializationStoreType extends ExpandableStringEnum { + /** Static value None for MaterializationStoreType. */ + public static final MaterializationStoreType NONE = fromString("None"); + + /** Static value Online for MaterializationStoreType. */ + public static final MaterializationStoreType ONLINE = fromString("Online"); + + /** Static value Offline for MaterializationStoreType. */ + public static final MaterializationStoreType OFFLINE = fromString("Offline"); + + /** Static value OnlineAndOffline for MaterializationStoreType. */ + public static final MaterializationStoreType ONLINE_AND_OFFLINE = fromString("OnlineAndOffline"); + + /** + * Creates a new instance of MaterializationStoreType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaterializationStoreType() { + } + + /** + * Creates or finds a MaterializationStoreType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaterializationStoreType. + */ + @JsonCreator + public static MaterializationStoreType fromString(String name) { + return fromString(name, MaterializationStoreType.class); + } + + /** + * Gets known MaterializationStoreType values. + * + * @return known MaterializationStoreType values. + */ + public static Collection values() { + return values(MaterializationStoreType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java index 0841f457eef91..43ca8e4f48fd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java @@ -66,22 +66,25 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The ModelContainer definition stages. */ interface DefinitionStages { /** The first stage of the ModelContainer definition. */ interface Blank extends WithParentResource { } + /** The stage of the ModelContainer definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName. + * Specifies resourceGroupName, registryName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @return the next definition stage. */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + WithProperties withExistingRegistry(String resourceGroupName, String registryName); } + /** The stage of the ModelContainer definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(ModelContainerProperties properties); } + /** * The stage of the ModelContainer 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. @@ -113,6 +117,7 @@ interface WithCreate { ModelContainer create(Context context); } } + /** * Begins update for the ModelContainer resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ ModelContainer apply(Context context); } + /** The ModelContainer update stages. */ interface UpdateStages { /** The stage of the ModelContainer update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(ModelContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java index aaf2c9cb402a9..f2a5d02d7fb0b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java @@ -5,15 +5,31 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The ModelContainerProperties model. */ @Fluent public final class ModelContainerProperties extends AssetContainer { + /* + * Provisioning state for the model container. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + /** Creates an instance of ModelContainerProperties class. */ public ModelContainerProperties() { } + /** + * Get the provisioningState property: Provisioning state for the model container. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** {@inheritDoc} */ @Override public ModelContainerProperties withIsArchived(Boolean isArchived) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java index e6173d6d334ed..09bf76c60a391 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; /** Resource collection API of ModelContainers. */ public interface ModelContainers { @@ -99,55 +100,33 @@ Response getWithResponse( ModelContainer get(String resourceGroupName, String workspaceName, String name); /** - * Get container. - * - * @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 container along with {@link Response}. - */ - ModelContainer getById(String id); - - /** - * Get container. + * Create or update container. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @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 azure Resource Manager resource envelope along with {@link Response}. */ - void deleteById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); /** - * Delete container. + * Create or update container. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelContainer resource. - * - * @param name resource name. - * @return the first stage of the new ModelContainer definition. + * @return azure Resource Manager resource envelope. */ - ModelContainer.DefinitionStages.Blank define(String name); + ModelContainer createOrUpdate( + String resourceGroupName, String workspaceName, String name, ModelContainerInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java new file mode 100644 index 0000000000000..8c4c7e95a8d31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Model task type enum. */ +public final class ModelTaskType extends ExpandableStringEnum { + /** Static value Classification for ModelTaskType. */ + public static final ModelTaskType CLASSIFICATION = fromString("Classification"); + + /** Static value Regression for ModelTaskType. */ + public static final ModelTaskType REGRESSION = fromString("Regression"); + + /** + * Creates a new instance of ModelTaskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ModelTaskType() { + } + + /** + * Creates or finds a ModelTaskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelTaskType. + */ + @JsonCreator + public static ModelTaskType fromString(String name) { + return fromString(name, ModelTaskType.class); + } + + /** + * Gets known ModelTaskType values. + * + * @return known ModelTaskType values. + */ + public static Collection values() { + return values(ModelTaskType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java index 6d8d49f169842..c6e81805b5bcb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; @@ -66,23 +67,26 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The ModelVersion definition stages. */ interface DefinitionStages { /** The first stage of the ModelVersion definition. */ interface Blank extends WithParentResource { } + /** The stage of the ModelVersion definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, name. + * Specifies resourceGroupName, registryName, modelName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. * @return the next definition stage. */ - WithProperties withExistingModel(String resourceGroupName, String workspaceName, String name); + WithProperties withExistingModel(String resourceGroupName, String registryName, String modelName); } + /** The stage of the ModelVersion definition allowing to specify properties. */ interface WithProperties { /** @@ -93,6 +97,7 @@ interface WithProperties { */ WithCreate withProperties(ModelVersionProperties properties); } + /** * The stage of the ModelVersion 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. @@ -114,6 +119,7 @@ interface WithCreate { ModelVersion create(Context context); } } + /** * Begins update for the ModelVersion resource. * @@ -138,6 +144,7 @@ interface Update extends UpdateStages.WithProperties { */ ModelVersion apply(Context context); } + /** The ModelVersion update stages. */ interface UpdateStages { /** The stage of the ModelVersion update allowing to specify properties. */ @@ -151,6 +158,7 @@ interface WithProperties { Update withProperties(ModelVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. * @@ -165,4 +173,28 @@ interface WithProperties { * @return the refreshed resource. */ ModelVersion refresh(Context context); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + PendingUploadRequestDto body, Context context); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload(PendingUploadRequestDto body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java index 93b7cedb104b1..cdc7212c19c51 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java @@ -37,6 +37,18 @@ public final class ModelVersionProperties extends AssetBase { @JsonProperty(value = "modelUri") private String modelUri; + /* + * Provisioning state for the model version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /* + * Stage in the model lifecycle assigned to this model + */ + @JsonProperty(value = "stage") + private String stage; + /** Creates an instance of ModelVersionProperties class. */ public ModelVersionProperties() { } @@ -121,6 +133,35 @@ public ModelVersionProperties withModelUri(String modelUri) { return this; } + /** + * Get the provisioningState property: Provisioning state for the model version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the stage property: Stage in the model lifecycle assigned to this model. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Stage in the model lifecycle assigned to this model. + * + * @param stage the stage value to set. + * @return the ModelVersionProperties object itself. + */ + public ModelVersionProperties withStage(String stage) { + this.stage = stage; + return this; + } + /** {@inheritDoc} */ @Override public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java index 050389e0716e0..e8bd25ca1af32 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; /** Resource collection API of ModelVersions. */ public interface ModelVersions { @@ -121,55 +122,75 @@ Response getWithResponse( ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * Create or update version. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - ModelVersion getById(String id); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String name, + String version, + ModelVersionInner body, + Context context); /** - * Get version. + * Create or update version. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return azure Resource Manager resource envelope. */ - Response getByIdWithResponse(String id, Context context); + ModelVersion createOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. + * Publish version asset into registry. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param version Version identifier. + * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelVersion resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersion definition. - */ - ModelVersion.DefinitionStages.Blank define(String name); + void publish( + String resourceGroupName, + String workspaceName, + String name, + String version, + DestinationAsset body, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java new file mode 100644 index 0000000000000..8791110a579b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Monitor compute configuration base definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "computeType", + defaultImpl = MonitorComputeConfigurationBase.class) +@JsonTypeName("MonitorComputeConfigurationBase") +@JsonSubTypes({@JsonSubTypes.Type(name = "ServerlessSpark", value = MonitorServerlessSparkCompute.class)}) +@Immutable +public class MonitorComputeConfigurationBase { + /** Creates an instance of MonitorComputeConfigurationBase class. */ + public MonitorComputeConfigurationBase() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java new file mode 100644 index 0000000000000..2b5d35d2ca64b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Monitor compute identity base definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "computeIdentityType", + defaultImpl = MonitorComputeIdentityBase.class) +@JsonTypeName("MonitorComputeIdentityBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AmlToken", value = AmlTokenComputeIdentity.class), + @JsonSubTypes.Type(name = "ManagedIdentity", value = ManagedComputeIdentity.class) +}) +@Immutable +public class MonitorComputeIdentityBase { + /** Creates an instance of MonitorComputeIdentityBase class. */ + public MonitorComputeIdentityBase() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java new file mode 100644 index 0000000000000..026df51eb14b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Monitor compute identity type enum. */ +public final class MonitorComputeIdentityType extends ExpandableStringEnum { + /** Static value AmlToken for MonitorComputeIdentityType. */ + public static final MonitorComputeIdentityType AML_TOKEN = fromString("AmlToken"); + + /** Static value ManagedIdentity for MonitorComputeIdentityType. */ + public static final MonitorComputeIdentityType MANAGED_IDENTITY = fromString("ManagedIdentity"); + + /** + * Creates a new instance of MonitorComputeIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitorComputeIdentityType() { + } + + /** + * Creates or finds a MonitorComputeIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitorComputeIdentityType. + */ + @JsonCreator + public static MonitorComputeIdentityType fromString(String name) { + return fromString(name, MonitorComputeIdentityType.class); + } + + /** + * Gets known MonitorComputeIdentityType values. + * + * @return known MonitorComputeIdentityType values. + */ + public static Collection values() { + return values(MonitorComputeIdentityType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java new file mode 100644 index 0000000000000..2393092bb37ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Monitor compute type enum. */ +public final class MonitorComputeType extends ExpandableStringEnum { + /** Static value ServerlessSpark for MonitorComputeType. */ + public static final MonitorComputeType SERVERLESS_SPARK = fromString("ServerlessSpark"); + + /** + * Creates a new instance of MonitorComputeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitorComputeType() { + } + + /** + * Creates or finds a MonitorComputeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitorComputeType. + */ + @JsonCreator + public static MonitorComputeType fromString(String name) { + return fromString(name, MonitorComputeType.class); + } + + /** + * Gets known MonitorComputeType values. + * + * @return known MonitorComputeType values. + */ + public static Collection values() { + return values(MonitorComputeType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java new file mode 100644 index 0000000000000..d02c94a63d2b6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The MonitorDefinition model. */ +@Fluent +public final class MonitorDefinition { + /* + * The monitor's notification settings. + */ + @JsonProperty(value = "alertNotificationSettings") + private MonitorNotificationSettings alertNotificationSettings; + + /* + * [Required] The ARM resource ID of the compute resource to run the monitoring job on. + */ + @JsonProperty(value = "computeConfiguration", required = true) + private MonitorComputeConfigurationBase computeConfiguration; + + /* + * The entities targeted by the monitor. + */ + @JsonProperty(value = "monitoringTarget") + private MonitoringTarget monitoringTarget; + + /* + * [Required] The signals to monitor. + */ + @JsonProperty(value = "signals", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map signals; + + /** Creates an instance of MonitorDefinition class. */ + public MonitorDefinition() { + } + + /** + * Get the alertNotificationSettings property: The monitor's notification settings. + * + * @return the alertNotificationSettings value. + */ + public MonitorNotificationSettings alertNotificationSettings() { + return this.alertNotificationSettings; + } + + /** + * Set the alertNotificationSettings property: The monitor's notification settings. + * + * @param alertNotificationSettings the alertNotificationSettings value to set. + * @return the MonitorDefinition object itself. + */ + public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { + this.alertNotificationSettings = alertNotificationSettings; + return this; + } + + /** + * Get the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the + * monitoring job on. + * + * @return the computeConfiguration value. + */ + public MonitorComputeConfigurationBase computeConfiguration() { + return this.computeConfiguration; + } + + /** + * Set the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the + * monitoring job on. + * + * @param computeConfiguration the computeConfiguration value to set. + * @return the MonitorDefinition object itself. + */ + public MonitorDefinition withComputeConfiguration(MonitorComputeConfigurationBase computeConfiguration) { + this.computeConfiguration = computeConfiguration; + return this; + } + + /** + * Get the monitoringTarget property: The entities targeted by the monitor. + * + * @return the monitoringTarget value. + */ + public MonitoringTarget monitoringTarget() { + return this.monitoringTarget; + } + + /** + * Set the monitoringTarget property: The entities targeted by the monitor. + * + * @param monitoringTarget the monitoringTarget value to set. + * @return the MonitorDefinition object itself. + */ + public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { + this.monitoringTarget = monitoringTarget; + return this; + } + + /** + * Get the signals property: [Required] The signals to monitor. + * + * @return the signals value. + */ + public Map signals() { + return this.signals; + } + + /** + * Set the signals property: [Required] The signals to monitor. + * + * @param signals the signals value to set. + * @return the MonitorDefinition object itself. + */ + public MonitorDefinition withSignals(Map signals) { + this.signals = signals; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (alertNotificationSettings() != null) { + alertNotificationSettings().validate(); + } + if (computeConfiguration() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property computeConfiguration in model MonitorDefinition")); + } else { + computeConfiguration().validate(); + } + if (monitoringTarget() != null) { + monitoringTarget().validate(); + } + if (signals() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property signals in model MonitorDefinition")); + } else { + signals() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorDefinition.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java new file mode 100644 index 0000000000000..e7f7dbb1f8ec6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The MonitorEmailNotificationSettings model. */ +@Fluent +public final class MonitorEmailNotificationSettings { + /* + * The email recipient list which has a limitation of 499 characters in total. + */ + @JsonProperty(value = "emails") + private List emails; + + /** Creates an instance of MonitorEmailNotificationSettings class. */ + public MonitorEmailNotificationSettings() { + } + + /** + * Get the emails property: The email recipient list which has a limitation of 499 characters in total. + * + * @return the emails value. + */ + public List emails() { + return this.emails; + } + + /** + * Set the emails property: The email recipient list which has a limitation of 499 characters in total. + * + * @param emails the emails value to set. + * @return the MonitorEmailNotificationSettings object itself. + */ + public MonitorEmailNotificationSettings withEmails(List emails) { + this.emails = emails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java new file mode 100644 index 0000000000000..efc32cde54651 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MonitorNotificationSettings model. */ +@Fluent +public final class MonitorNotificationSettings { + /* + * The AML notification email settings. + */ + @JsonProperty(value = "emailNotificationSettings") + private MonitorEmailNotificationSettings emailNotificationSettings; + + /** Creates an instance of MonitorNotificationSettings class. */ + public MonitorNotificationSettings() { + } + + /** + * Get the emailNotificationSettings property: The AML notification email settings. + * + * @return the emailNotificationSettings value. + */ + public MonitorEmailNotificationSettings emailNotificationSettings() { + return this.emailNotificationSettings; + } + + /** + * Set the emailNotificationSettings property: The AML notification email settings. + * + * @param emailNotificationSettings the emailNotificationSettings value to set. + * @return the MonitorNotificationSettings object itself. + */ + public MonitorNotificationSettings withEmailNotificationSettings( + MonitorEmailNotificationSettings emailNotificationSettings) { + this.emailNotificationSettings = emailNotificationSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (emailNotificationSettings() != null) { + emailNotificationSettings().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java new file mode 100644 index 0000000000000..85bc63049d52e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Monitor serverless spark compute definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") +@JsonTypeName("ServerlessSpark") +@Fluent +public final class MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { + /* + * [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + */ + @JsonProperty(value = "computeIdentity", required = true) + private MonitorComputeIdentityBase computeIdentity; + + /* + * [Required] The instance type running the Spark job. + */ + @JsonProperty(value = "instanceType", required = true) + private String instanceType; + + /* + * [Required] The Spark runtime version. + */ + @JsonProperty(value = "runtimeVersion", required = true) + private String runtimeVersion; + + /** Creates an instance of MonitorServerlessSparkCompute class. */ + public MonitorServerlessSparkCompute() { + } + + /** + * Get the computeIdentity property: [Required] The identity scheme leveraged to by the spark jobs running on + * serverless Spark. + * + * @return the computeIdentity value. + */ + public MonitorComputeIdentityBase computeIdentity() { + return this.computeIdentity; + } + + /** + * Set the computeIdentity property: [Required] The identity scheme leveraged to by the spark jobs running on + * serverless Spark. + * + * @param computeIdentity the computeIdentity value to set. + * @return the MonitorServerlessSparkCompute object itself. + */ + public MonitorServerlessSparkCompute withComputeIdentity(MonitorComputeIdentityBase computeIdentity) { + this.computeIdentity = computeIdentity; + return this; + } + + /** + * Get the instanceType property: [Required] The instance type running the Spark job. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: [Required] The instance type running the Spark job. + * + * @param instanceType the instanceType value to set. + * @return the MonitorServerlessSparkCompute object itself. + */ + public MonitorServerlessSparkCompute withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the runtimeVersion property: [Required] The Spark runtime version. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: [Required] The Spark runtime version. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the MonitorServerlessSparkCompute object itself. + */ + public MonitorServerlessSparkCompute withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (computeIdentity() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property computeIdentity in model MonitorServerlessSparkCompute")); + } else { + computeIdentity().validate(); + } + if (instanceType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property instanceType in model MonitorServerlessSparkCompute")); + } + if (runtimeVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property runtimeVersion in model MonitorServerlessSparkCompute")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorServerlessSparkCompute.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java new file mode 100644 index 0000000000000..0a1adce4b71be --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MonitoringFeatureDataType. */ +public final class MonitoringFeatureDataType extends ExpandableStringEnum { + /** Static value Numerical for MonitoringFeatureDataType. */ + public static final MonitoringFeatureDataType NUMERICAL = fromString("Numerical"); + + /** Static value Categorical for MonitoringFeatureDataType. */ + public static final MonitoringFeatureDataType CATEGORICAL = fromString("Categorical"); + + /** + * Creates a new instance of MonitoringFeatureDataType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringFeatureDataType() { + } + + /** + * Creates or finds a MonitoringFeatureDataType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringFeatureDataType. + */ + @JsonCreator + public static MonitoringFeatureDataType fromString(String name) { + return fromString(name, MonitoringFeatureDataType.class); + } + + /** + * Gets known MonitoringFeatureDataType values. + * + * @return known MonitoringFeatureDataType values. + */ + public static Collection values() { + return values(MonitoringFeatureDataType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java new file mode 100644 index 0000000000000..be6e3841178f5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The MonitoringFeatureFilterBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "filterType", + defaultImpl = MonitoringFeatureFilterBase.class) +@JsonTypeName("MonitoringFeatureFilterBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AllFeatures", value = AllFeatures.class), + @JsonSubTypes.Type(name = "FeatureSubset", value = FeatureSubset.class), + @JsonSubTypes.Type(name = "TopNByAttribution", value = TopNFeaturesByAttribution.class) +}) +@Immutable +public class MonitoringFeatureFilterBase { + /** Creates an instance of MonitoringFeatureFilterBase class. */ + public MonitoringFeatureFilterBase() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java new file mode 100644 index 0000000000000..0172a563bca72 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MonitoringFeatureFilterType. */ +public final class MonitoringFeatureFilterType extends ExpandableStringEnum { + /** Static value AllFeatures for MonitoringFeatureFilterType. */ + public static final MonitoringFeatureFilterType ALL_FEATURES = fromString("AllFeatures"); + + /** Static value TopNByAttribution for MonitoringFeatureFilterType. */ + public static final MonitoringFeatureFilterType TOP_NBY_ATTRIBUTION = fromString("TopNByAttribution"); + + /** Static value FeatureSubset for MonitoringFeatureFilterType. */ + public static final MonitoringFeatureFilterType FEATURE_SUBSET = fromString("FeatureSubset"); + + /** + * Creates a new instance of MonitoringFeatureFilterType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringFeatureFilterType() { + } + + /** + * Creates or finds a MonitoringFeatureFilterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringFeatureFilterType. + */ + @JsonCreator + public static MonitoringFeatureFilterType fromString(String name) { + return fromString(name, MonitoringFeatureFilterType.class); + } + + /** + * Gets known MonitoringFeatureFilterType values. + * + * @return known MonitoringFeatureFilterType values. + */ + public static Collection values() { + return values(MonitoringFeatureFilterType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java new file mode 100644 index 0000000000000..e49dae44325f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** Monitoring input data base definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "inputDataType", + defaultImpl = MonitoringInputDataBase.class) +@JsonTypeName("MonitoringInputDataBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Fixed", value = FixedInputData.class), + @JsonSubTypes.Type(name = "Rolling", value = RollingInputData.class), + @JsonSubTypes.Type(name = "Static", value = StaticInputData.class) +}) +@Fluent +public class MonitoringInputDataBase { + /* + * Mapping of column names to special uses. + */ + @JsonProperty(value = "columns") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map columns; + + /* + * The context metadata of the data source. + */ + @JsonProperty(value = "dataContext") + private String dataContext; + + /* + * [Required] Specifies the type of job. + */ + @JsonProperty(value = "jobInputType", required = true) + private JobInputType jobInputType; + + /* + * [Required] Input Asset URI. + */ + @JsonProperty(value = "uri", required = true) + private String uri; + + /** Creates an instance of MonitoringInputDataBase class. */ + public MonitoringInputDataBase() { + } + + /** + * Get the columns property: Mapping of column names to special uses. + * + * @return the columns value. + */ + public Map columns() { + return this.columns; + } + + /** + * Set the columns property: Mapping of column names to special uses. + * + * @param columns the columns value to set. + * @return the MonitoringInputDataBase object itself. + */ + public MonitoringInputDataBase withColumns(Map columns) { + this.columns = columns; + return this; + } + + /** + * Get the dataContext property: The context metadata of the data source. + * + * @return the dataContext value. + */ + public String dataContext() { + return this.dataContext; + } + + /** + * Set the dataContext property: The context metadata of the data source. + * + * @param dataContext the dataContext value to set. + * @return the MonitoringInputDataBase object itself. + */ + public MonitoringInputDataBase withDataContext(String dataContext) { + this.dataContext = dataContext; + return this; + } + + /** + * Get the jobInputType property: [Required] Specifies the type of job. + * + * @return the jobInputType value. + */ + public JobInputType jobInputType() { + return this.jobInputType; + } + + /** + * Set the jobInputType property: [Required] Specifies the type of job. + * + * @param jobInputType the jobInputType value to set. + * @return the MonitoringInputDataBase object itself. + */ + public MonitoringInputDataBase withJobInputType(JobInputType jobInputType) { + this.jobInputType = jobInputType; + return this; + } + + /** + * Get the uri property: [Required] Input Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: [Required] Input Asset URI. + * + * @param uri the uri value to set. + * @return the MonitoringInputDataBase object itself. + */ + public MonitoringInputDataBase withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (jobInputType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property jobInputType in model MonitoringInputDataBase")); + } + if (uri() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model MonitoringInputDataBase")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoringInputDataBase.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java new file mode 100644 index 0000000000000..de761512d27b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Monitoring input data type enum. */ +public final class MonitoringInputDataType extends ExpandableStringEnum { + /** Static value Static for MonitoringInputDataType. */ + public static final MonitoringInputDataType STATIC = fromString("Static"); + + /** Static value Rolling for MonitoringInputDataType. */ + public static final MonitoringInputDataType ROLLING = fromString("Rolling"); + + /** Static value Fixed for MonitoringInputDataType. */ + public static final MonitoringInputDataType FIXED = fromString("Fixed"); + + /** + * Creates a new instance of MonitoringInputDataType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringInputDataType() { + } + + /** + * Creates or finds a MonitoringInputDataType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringInputDataType. + */ + @JsonCreator + public static MonitoringInputDataType fromString(String name) { + return fromString(name, MonitoringInputDataType.class); + } + + /** + * Gets known MonitoringInputDataType values. + * + * @return known MonitoringInputDataType values. + */ + public static Collection values() { + return values(MonitoringInputDataType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java new file mode 100644 index 0000000000000..250f998e6b7f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MonitoringNotificationType. */ +public final class MonitoringNotificationType extends ExpandableStringEnum { + /** Static value AmlNotification for MonitoringNotificationType. */ + public static final MonitoringNotificationType AML_NOTIFICATION = fromString("AmlNotification"); + + /** + * Creates a new instance of MonitoringNotificationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringNotificationType() { + } + + /** + * Creates or finds a MonitoringNotificationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringNotificationType. + */ + @JsonCreator + public static MonitoringNotificationType fromString(String name) { + return fromString(name, MonitoringNotificationType.class); + } + + /** + * Gets known MonitoringNotificationType values. + * + * @return known MonitoringNotificationType values. + */ + public static Collection values() { + return values(MonitoringNotificationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java new file mode 100644 index 0000000000000..52bab89bf5f3e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The MonitoringSignalBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "signalType", + defaultImpl = MonitoringSignalBase.class) +@JsonTypeName("MonitoringSignalBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Custom", value = CustomMonitoringSignal.class), + @JsonSubTypes.Type(name = "DataDrift", value = DataDriftMonitoringSignal.class), + @JsonSubTypes.Type(name = "DataQuality", value = DataQualityMonitoringSignal.class), + @JsonSubTypes.Type(name = "FeatureAttributionDrift", value = FeatureAttributionDriftMonitoringSignal.class), + @JsonSubTypes.Type(name = "PredictionDrift", value = PredictionDriftMonitoringSignal.class) +}) +@Fluent +public class MonitoringSignalBase { + /* + * The current notification mode for this signal. + */ + @JsonProperty(value = "notificationTypes") + private List notificationTypes; + + /* + * Property dictionary. Properties can be added, but not removed or altered. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** Creates an instance of MonitoringSignalBase class. */ + public MonitoringSignalBase() { + } + + /** + * Get the notificationTypes property: The current notification mode for this signal. + * + * @return the notificationTypes value. + */ + public List notificationTypes() { + return this.notificationTypes; + } + + /** + * Set the notificationTypes property: The current notification mode for this signal. + * + * @param notificationTypes the notificationTypes value to set. + * @return the MonitoringSignalBase object itself. + */ + public MonitoringSignalBase withNotificationTypes(List notificationTypes) { + this.notificationTypes = notificationTypes; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @param properties the properties value to set. + * @return the MonitoringSignalBase object itself. + */ + public MonitoringSignalBase withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java new file mode 100644 index 0000000000000..3a55e79b79fdf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MonitoringSignalType. */ +public final class MonitoringSignalType extends ExpandableStringEnum { + /** Static value DataDrift for MonitoringSignalType. */ + public static final MonitoringSignalType DATA_DRIFT = fromString("DataDrift"); + + /** Static value PredictionDrift for MonitoringSignalType. */ + public static final MonitoringSignalType PREDICTION_DRIFT = fromString("PredictionDrift"); + + /** Static value DataQuality for MonitoringSignalType. */ + public static final MonitoringSignalType DATA_QUALITY = fromString("DataQuality"); + + /** Static value FeatureAttributionDrift for MonitoringSignalType. */ + public static final MonitoringSignalType FEATURE_ATTRIBUTION_DRIFT = fromString("FeatureAttributionDrift"); + + /** Static value Custom for MonitoringSignalType. */ + public static final MonitoringSignalType CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of MonitoringSignalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringSignalType() { + } + + /** + * Creates or finds a MonitoringSignalType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringSignalType. + */ + @JsonCreator + public static MonitoringSignalType fromString(String name) { + return fromString(name, MonitoringSignalType.class); + } + + /** + * Gets known MonitoringSignalType values. + * + * @return known MonitoringSignalType values. + */ + public static Collection values() { + return values(MonitoringSignalType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java new file mode 100644 index 0000000000000..1d84417632f1a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Monitoring target definition. */ +@Fluent +public final class MonitoringTarget { + /* + * Reference to the deployment asset targeted by this monitor. + */ + @JsonProperty(value = "deploymentId") + private String deploymentId; + + /* + * Reference to the model asset targeted by this monitor. + */ + @JsonProperty(value = "modelId") + private String modelId; + + /* + * [Required] The machine learning task type of the monitored model. + */ + @JsonProperty(value = "taskType", required = true) + private ModelTaskType taskType; + + /** Creates an instance of MonitoringTarget class. */ + public MonitoringTarget() { + } + + /** + * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. + * + * @param deploymentId the deploymentId value to set. + * @return the MonitoringTarget object itself. + */ + public MonitoringTarget withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + /** + * Get the modelId property: Reference to the model asset targeted by this monitor. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: Reference to the model asset targeted by this monitor. + * + * @param modelId the modelId value to set. + * @return the MonitoringTarget object itself. + */ + public MonitoringTarget withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Get the taskType property: [Required] The machine learning task type of the monitored model. + * + * @return the taskType value. + */ + public ModelTaskType taskType() { + return this.taskType; + } + + /** + * Set the taskType property: [Required] The machine learning task type of the monitored model. + * + * @param taskType the taskType value to set. + * @return the MonitoringTarget object itself. + */ + public MonitoringTarget withTaskType(ModelTaskType taskType) { + this.taskType = taskType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (taskType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property taskType in model MonitoringTarget")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoringTarget.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java new file mode 100644 index 0000000000000..e10b6721a9890 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MonitoringThreshold model. */ +@Fluent +public final class MonitoringThreshold { + /* + * The threshold value. If null, the set default is dependent on the metric type. + */ + @JsonProperty(value = "value") + private Double value; + + /** Creates an instance of MonitoringThreshold class. */ + public MonitoringThreshold() { + } + + /** + * Get the value property: The threshold value. If null, the set default is dependent on the metric type. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: The threshold value. If null, the set default is dependent on the metric type. + * + * @param value the value value to set. + * @return the MonitoringThreshold object itself. + */ + public MonitoringThreshold withValue(Double value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java new file mode 100644 index 0000000000000..7dda54e50f54f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Abstract Nodes definition. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "nodesValueType", + defaultImpl = Nodes.class) +@JsonTypeName("Nodes") +@JsonSubTypes({@JsonSubTypes.Type(name = "All", value = AllNodes.class)}) +@Immutable +public class Nodes { + /** Creates an instance of Nodes class. */ + public Nodes() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java new file mode 100644 index 0000000000000..3e486e36c3c1e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The enumerated types for the nodes value. */ +public final class NodesValueType extends ExpandableStringEnum { + /** Static value All for NodesValueType. */ + public static final NodesValueType ALL = fromString("All"); + + /** + * Creates a new instance of NodesValueType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodesValueType() { + } + + /** + * Creates or finds a NodesValueType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodesValueType. + */ + @JsonCreator + public static NodesValueType fromString(String name) { + return fromString(name, NodesValueType.class); + } + + /** + * Gets known NodesValueType values. + * + * @return known NodesValueType values. + */ + public static Collection values() { + return values(NodesValueType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java new file mode 100644 index 0000000000000..96478b484d54e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Configuration for notification. */ +@Fluent +public final class NotificationSetting { + /* + * Send email notification to user on specified notification type + */ + @JsonProperty(value = "emailOn") + private List emailOn; + + /* + * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + */ + @JsonProperty(value = "emails") + private List emails; + + /* + * Send webhook callback to a service. Key is a user-provided name for the webhook. + */ + @JsonProperty(value = "webhooks") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map webhooks; + + /** Creates an instance of NotificationSetting class. */ + public NotificationSetting() { + } + + /** + * Get the emailOn property: Send email notification to user on specified notification type. + * + * @return the emailOn value. + */ + public List emailOn() { + return this.emailOn; + } + + /** + * Set the emailOn property: Send email notification to user on specified notification type. + * + * @param emailOn the emailOn value to set. + * @return the NotificationSetting object itself. + */ + public NotificationSetting withEmailOn(List emailOn) { + this.emailOn = emailOn; + return this; + } + + /** + * Get the emails property: This is the email recipient list which has a limitation of 499 characters in total + * concat with comma separator. + * + * @return the emails value. + */ + public List emails() { + return this.emails; + } + + /** + * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total + * concat with comma separator. + * + * @param emails the emails value to set. + * @return the NotificationSetting object itself. + */ + public NotificationSetting withEmails(List emails) { + this.emails = emails; + return this; + } + + /** + * Get the webhooks property: Send webhook callback to a service. Key is a user-provided name for the webhook. + * + * @return the webhooks value. + */ + public Map webhooks() { + return this.webhooks; + } + + /** + * Set the webhooks property: Send webhook callback to a service. Key is a user-provided name for the webhook. + * + * @param webhooks the webhooks value to set. + * @return the NotificationSetting object itself. + */ + public NotificationSetting withWebhooks(Map webhooks) { + this.webhooks = webhooks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (webhooks() != null) { + webhooks() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java new file mode 100644 index 0000000000000..354f6b6a9994d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NumericalDataDriftMetric. */ +public final class NumericalDataDriftMetric extends ExpandableStringEnum { + /** Static value JensenShannonDistance for NumericalDataDriftMetric. */ + public static final NumericalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); + + /** Static value PopulationStabilityIndex for NumericalDataDriftMetric. */ + public static final NumericalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); + + /** Static value NormalizedWassersteinDistance for NumericalDataDriftMetric. */ + public static final NumericalDataDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE = + fromString("NormalizedWassersteinDistance"); + + /** Static value TwoSampleKolmogorovSmirnovTest for NumericalDataDriftMetric. */ + public static final NumericalDataDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST = + fromString("TwoSampleKolmogorovSmirnovTest"); + + /** + * Creates a new instance of NumericalDataDriftMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NumericalDataDriftMetric() { + } + + /** + * Creates or finds a NumericalDataDriftMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding NumericalDataDriftMetric. + */ + @JsonCreator + public static NumericalDataDriftMetric fromString(String name) { + return fromString(name, NumericalDataDriftMetric.class); + } + + /** + * Gets known NumericalDataDriftMetric values. + * + * @return known NumericalDataDriftMetric values. + */ + public static Collection values() { + return values(NumericalDataDriftMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java new file mode 100644 index 0000000000000..be451bfa636cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The NumericalDataDriftMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Numerical") +@Fluent +public final class NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + /* + * [Required] The numerical data drift metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private NumericalDataDriftMetric metric; + + /** Creates an instance of NumericalDataDriftMetricThreshold class. */ + public NumericalDataDriftMetricThreshold() { + } + + /** + * Get the metric property: [Required] The numerical data drift metric to calculate. + * + * @return the metric value. + */ + public NumericalDataDriftMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The numerical data drift metric to calculate. + * + * @param metric the metric value to set. + * @return the NumericalDataDriftMetricThreshold object itself. + */ + public NumericalDataDriftMetricThreshold withMetric(NumericalDataDriftMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumericalDataDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model NumericalDataDriftMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NumericalDataDriftMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java new file mode 100644 index 0000000000000..ea729dc12c419 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NumericalDataQualityMetric. */ +public final class NumericalDataQualityMetric extends ExpandableStringEnum { + /** Static value NullValueRate for NumericalDataQualityMetric. */ + public static final NumericalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); + + /** Static value DataTypeErrorRate for NumericalDataQualityMetric. */ + public static final NumericalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); + + /** Static value OutOfBoundsRate for NumericalDataQualityMetric. */ + public static final NumericalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); + + /** + * Creates a new instance of NumericalDataQualityMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NumericalDataQualityMetric() { + } + + /** + * Creates or finds a NumericalDataQualityMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding NumericalDataQualityMetric. + */ + @JsonCreator + public static NumericalDataQualityMetric fromString(String name) { + return fromString(name, NumericalDataQualityMetric.class); + } + + /** + * Gets known NumericalDataQualityMetric values. + * + * @return known NumericalDataQualityMetric values. + */ + public static Collection values() { + return values(NumericalDataQualityMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java new file mode 100644 index 0000000000000..ccd859d7531cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The NumericalDataQualityMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Numerical") +@Fluent +public final class NumericalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { + /* + * [Required] The numerical data quality metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private NumericalDataQualityMetric metric; + + /** Creates an instance of NumericalDataQualityMetricThreshold class. */ + public NumericalDataQualityMetricThreshold() { + } + + /** + * Get the metric property: [Required] The numerical data quality metric to calculate. + * + * @return the metric value. + */ + public NumericalDataQualityMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The numerical data quality metric to calculate. + * + * @param metric the metric value to set. + * @return the NumericalDataQualityMetricThreshold object itself. + */ + public NumericalDataQualityMetricThreshold withMetric(NumericalDataQualityMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumericalDataQualityMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model NumericalDataQualityMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NumericalDataQualityMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java new file mode 100644 index 0000000000000..a7e127e0020ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for NumericalPredictionDriftMetric. */ +public final class NumericalPredictionDriftMetric extends ExpandableStringEnum { + /** Static value JensenShannonDistance for NumericalPredictionDriftMetric. */ + public static final NumericalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); + + /** Static value PopulationStabilityIndex for NumericalPredictionDriftMetric. */ + public static final NumericalPredictionDriftMetric POPULATION_STABILITY_INDEX = + fromString("PopulationStabilityIndex"); + + /** Static value NormalizedWassersteinDistance for NumericalPredictionDriftMetric. */ + public static final NumericalPredictionDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE = + fromString("NormalizedWassersteinDistance"); + + /** Static value TwoSampleKolmogorovSmirnovTest for NumericalPredictionDriftMetric. */ + public static final NumericalPredictionDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST = + fromString("TwoSampleKolmogorovSmirnovTest"); + + /** + * Creates a new instance of NumericalPredictionDriftMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NumericalPredictionDriftMetric() { + } + + /** + * Creates or finds a NumericalPredictionDriftMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding NumericalPredictionDriftMetric. + */ + @JsonCreator + public static NumericalPredictionDriftMetric fromString(String name) { + return fromString(name, NumericalPredictionDriftMetric.class); + } + + /** + * Gets known NumericalPredictionDriftMetric values. + * + * @return known NumericalPredictionDriftMetric values. + */ + public static Collection values() { + return values(NumericalPredictionDriftMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java new file mode 100644 index 0000000000000..915731fd0dbd1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The NumericalPredictionDriftMetricThreshold model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("Numerical") +@Fluent +public final class NumericalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { + /* + * [Required] The numerical prediction drift metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private NumericalPredictionDriftMetric metric; + + /** Creates an instance of NumericalPredictionDriftMetricThreshold class. */ + public NumericalPredictionDriftMetricThreshold() { + } + + /** + * Get the metric property: [Required] The numerical prediction drift metric to calculate. + * + * @return the metric value. + */ + public NumericalPredictionDriftMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The numerical prediction drift metric to calculate. + * + * @param metric the metric value to set. + * @return the NumericalPredictionDriftMetricThreshold object itself. + */ + public NumericalPredictionDriftMetricThreshold withMetric(NumericalPredictionDriftMetric metric) { + this.metric = metric; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumericalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold threshold) { + super.withThreshold(threshold); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metric() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metric in model NumericalPredictionDriftMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NumericalPredictionDriftMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java index 2a4d9145dae6e..7b52e4f92bf5c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java @@ -120,11 +120,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The OnlineDeployment definition stages. */ interface DefinitionStages { /** The first stage of the OnlineDeployment definition. */ interface Blank extends WithLocation { } + /** The stage of the OnlineDeployment definition allowing to specify location. */ interface WithLocation { /** @@ -143,6 +145,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the OnlineDeployment definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -156,6 +159,7 @@ interface WithParentResource { WithProperties withExistingOnlineEndpoint( String resourceGroupName, String workspaceName, String endpointName); } + /** The stage of the OnlineDeployment definition allowing to specify properties. */ interface WithProperties { /** @@ -166,6 +170,7 @@ interface WithProperties { */ WithCreate withProperties(OnlineDeploymentProperties properties); } + /** * The stage of the OnlineDeployment 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. @@ -190,6 +195,7 @@ interface WithCreate */ OnlineDeployment create(Context context); } + /** The stage of the OnlineDeployment definition allowing to specify tags. */ interface WithTags { /** @@ -200,6 +206,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the OnlineDeployment definition allowing to specify identity. */ interface WithIdentity { /** @@ -211,6 +218,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the OnlineDeployment definition allowing to specify kind. */ interface WithKind { /** @@ -223,6 +231,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the OnlineDeployment definition allowing to specify sku. */ interface WithSku { /** @@ -234,6 +243,7 @@ interface WithSku { WithCreate withSku(Sku sku); } } + /** * Begins update for the OnlineDeployment resource. * @@ -258,6 +268,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { */ OnlineDeployment apply(Context context); } + /** The OnlineDeployment update stages. */ interface UpdateStages { /** The stage of the OnlineDeployment update allowing to specify tags. */ @@ -270,6 +281,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the OnlineDeployment update allowing to specify sku. */ interface WithSku { /** @@ -281,6 +293,7 @@ interface WithSku { Update withSku(PartialSku sku); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java index 45e3b1948649e..2c29a19ad5db5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java @@ -120,11 +120,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The OnlineEndpoint definition stages. */ interface DefinitionStages { /** The first stage of the OnlineEndpoint definition. */ interface Blank extends WithLocation { } + /** The stage of the OnlineEndpoint definition allowing to specify location. */ interface WithLocation { /** @@ -143,6 +145,7 @@ interface WithLocation { */ WithParentResource withRegion(String location); } + /** The stage of the OnlineEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -154,6 +157,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the OnlineEndpoint definition allowing to specify properties. */ interface WithProperties { /** @@ -164,6 +168,7 @@ interface WithProperties { */ WithCreate withProperties(OnlineEndpointProperties properties); } + /** * The stage of the OnlineEndpoint 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. @@ -188,6 +193,7 @@ interface WithCreate */ OnlineEndpoint create(Context context); } + /** The stage of the OnlineEndpoint definition allowing to specify tags. */ interface WithTags { /** @@ -198,6 +204,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the OnlineEndpoint definition allowing to specify identity. */ interface WithIdentity { /** @@ -209,6 +216,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the OnlineEndpoint definition allowing to specify kind. */ interface WithKind { /** @@ -221,6 +229,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the OnlineEndpoint definition allowing to specify sku. */ interface WithSku { /** @@ -232,6 +241,7 @@ interface WithSku { WithCreate withSku(Sku sku); } } + /** * Begins update for the OnlineEndpoint resource. * @@ -256,6 +266,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { */ OnlineEndpoint apply(Context context); } + /** The OnlineEndpoint update stages. */ interface UpdateStages { /** The stage of the OnlineEndpoint update allowing to specify tags. */ @@ -268,6 +279,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the OnlineEndpoint update allowing to specify identity. */ interface WithIdentity { /** @@ -280,6 +292,7 @@ interface WithIdentity { Update withIdentity(PartialManagedServiceIdentity identity); } } + /** * Refreshes the resource to sync with Azure. * @@ -337,7 +350,7 @@ interface WithIdentity { void regenerateKeys(RegenerateEndpointKeysRequest body, Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -348,7 +361,7 @@ interface WithIdentity { Response getTokenWithResponse(Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java index ae7b1c483c58f..f7896495dfc99 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java @@ -21,6 +21,14 @@ public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner @JsonProperty(value = "compute") private String compute; + /* + * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to + * sum to utmost 50. + */ + @JsonProperty(value = "mirrorTraffic") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map mirrorTraffic; + /* * Provisioning state for the endpoint. */ @@ -64,6 +72,28 @@ public OnlineEndpointProperties withCompute(String compute) { return this; } + /** + * Get the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned + * scoring. Traffic values need to sum to utmost 50. + * + * @return the mirrorTraffic value. + */ + public Map mirrorTraffic() { + return this.mirrorTraffic; + } + + /** + * Set the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned + * scoring. Traffic values need to sum to utmost 50. + * + * @param mirrorTraffic the mirrorTraffic value to set. + * @return the OnlineEndpointProperties object itself. + */ + public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { + this.mirrorTraffic = mirrorTraffic; + return this; + } + /** * Get the provisioningState property: Provisioning state for the endpoint. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java index 44e3dd0a80699..eb708d8ce2180 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java @@ -169,7 +169,7 @@ void regenerateKeys( Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -184,7 +184,7 @@ Response getTokenWithResponse( String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java new file mode 100644 index 0000000000000..45070878fa62d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java new file mode 100644 index 0000000000000..4c73d5586e7bf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localized display information for this particular operation. */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java new file mode 100644 index 0000000000000..096cff210c94c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java index d718ecc7e6d5b..c156b34a49f11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java @@ -14,10 +14,10 @@ public interface 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 an array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ - PagedIterable list(); + PagedIterable list(); /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. @@ -26,8 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 array of operations supported by the resource provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java new file mode 100644 index 0000000000000..47e370f65d7d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java new file mode 100644 index 0000000000000..7b8e294732c45 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Outbound Rule for the managed network of a machine learning workspace. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = OutboundRule.class) +@JsonTypeName("OutboundRule") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "PrivateEndpoint", value = PrivateEndpointOutboundRule.class), + @JsonSubTypes.Type(name = "ServiceTag", value = ServiceTagOutboundRule.class), + @JsonSubTypes.Type(name = "FQDN", value = FqdnOutboundRule.class) +}) +@Fluent +public class OutboundRule { + /* + * Category of a managed network Outbound Rule of a machine learning workspace. + */ + @JsonProperty(value = "category") + private RuleCategory category; + + /* + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + @JsonProperty(value = "status") + private RuleStatus status; + + /** Creates an instance of OutboundRule class. */ + public OutboundRule() { + } + + /** + * Get the category property: Category of a managed network Outbound Rule of a machine learning workspace. + * + * @return the category value. + */ + public RuleCategory category() { + return this.category; + } + + /** + * Set the category property: Category of a managed network Outbound Rule of a machine learning workspace. + * + * @param category the category value to set. + * @return the OutboundRule object itself. + */ + public OutboundRule withCategory(RuleCategory category) { + this.category = category; + return this; + } + + /** + * Get the status property: Type of a managed network Outbound Rule of a machine learning workspace. + * + * @return the status value. + */ + public RuleStatus status() { + return this.status; + } + + /** + * Set the status property: Type of a managed network Outbound Rule of a machine learning workspace. + * + * @param status the status value to set. + * @return the OutboundRule object itself. + */ + public OutboundRule withStatus(RuleStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java new file mode 100644 index 0000000000000..bd27d96a839d2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; + +/** An immutable client-side representation of OutboundRuleBasicResource. */ +public interface OutboundRuleBasicResource { + /** + * 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: Outbound Rule for the managed network of a machine learning workspace. + * + * @return the properties value. + */ + OutboundRule 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.machinelearning.fluent.models.OutboundRuleBasicResourceInner object. + * + * @return the inner object. + */ + OutboundRuleBasicResourceInner innerModel(); + + /** The entirety of the OutboundRuleBasicResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + + /** The OutboundRuleBasicResource definition stages. */ + interface DefinitionStages { + /** The first stage of the OutboundRuleBasicResource definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the OutboundRuleBasicResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** The stage of the OutboundRuleBasicResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Outbound Rule for the managed network of a machine learning + * workspace.. + * + * @param properties Outbound Rule for the managed network of a machine learning workspace. + * @return the next definition stage. + */ + WithCreate withProperties(OutboundRule properties); + } + + /** + * The stage of the OutboundRuleBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + OutboundRuleBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OutboundRuleBasicResource create(Context context); + } + } + + /** + * Begins update for the OutboundRuleBasicResource resource. + * + * @return the stage of resource update. + */ + OutboundRuleBasicResource.Update update(); + + /** The template for OutboundRuleBasicResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OutboundRuleBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OutboundRuleBasicResource apply(Context context); + } + + /** The OutboundRuleBasicResource update stages. */ + interface UpdateStages { + /** The stage of the OutboundRuleBasicResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Outbound Rule for the managed network of a machine learning + * workspace.. + * + * @param properties Outbound Rule for the managed network of a machine learning workspace. + * @return the next definition stage. + */ + Update withProperties(OutboundRule properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OutboundRuleBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OutboundRuleBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java new file mode 100644 index 0000000000000..acf23002225b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of outbound rules for the managed network of a machine learning workspace. */ +@Fluent +public final class OutboundRuleListResult { + /* + * The link to the next page constructed using the continuationToken. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to + * request the next list of machine learning workspaces. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of OutboundRuleListResult class. */ + public OutboundRuleListResult() { + } + + /** + * Get the nextLink property: The link to the next page constructed using the continuationToken. If null, there are + * no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page constructed using the continuationToken. If null, there are + * no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the OutboundRuleListResult object itself. + */ + public OutboundRuleListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink + * field should be used to request the next list of machine learning workspaces. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink + * field should be used to request the next list of machine learning workspaces. + * + * @param value the value value to set. + * @return the OutboundRuleListResult object itself. + */ + public OutboundRuleListResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java index 1939e23433ba5..5d45498c214e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java @@ -11,7 +11,7 @@ /** Managed service identity (system assigned and/or user assigned identities). */ @Fluent -public class PartialManagedServiceIdentity { +public final class PartialManagedServiceIdentity { /* * Managed service identity (system assigned and/or user assigned identities) */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java index 7187063fa6cc7..115d8eaaf4c37 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java @@ -10,7 +10,7 @@ /** Strictly used in update requests. */ @Fluent -public class PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { +public final class PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { /* * Managed service identity (system assigned and/or user assigned identities) */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java new file mode 100644 index 0000000000000..60d06f0bc28fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialRegistryPartialTrackedResource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private RegistryPartialManagedServiceIdentity identity; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private PartialSku sku; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of PartialRegistryPartialTrackedResource class. */ + public PartialRegistryPartialTrackedResource() { + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public RegistryPartialManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the PartialRegistryPartialTrackedResource object itself. + */ + public PartialRegistryPartialTrackedResource withIdentity(RegistryPartialManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public PartialSku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the PartialRegistryPartialTrackedResource object itself. + */ + public PartialRegistryPartialTrackedResource withSku(PartialSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialRegistryPartialTrackedResource object itself. + */ + public PartialRegistryPartialTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java new file mode 100644 index 0000000000000..bbb55bb1a2c64 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.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.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PendingUploadCredentialDto model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "credentialType", + defaultImpl = PendingUploadCredentialDto.class) +@JsonTypeName("PendingUploadCredentialDto") +@JsonSubTypes({@JsonSubTypes.Type(name = "SAS", value = SasCredentialDto.class)}) +@Immutable +public class PendingUploadCredentialDto { + /** Creates an instance of PendingUploadCredentialDto class. */ + public PendingUploadCredentialDto() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java new file mode 100644 index 0000000000000..df16576c1d638 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to determine the PendingUpload credentials type. */ +public final class PendingUploadCredentialType extends ExpandableStringEnum { + /** Static value SAS for PendingUploadCredentialType. */ + public static final PendingUploadCredentialType SAS = fromString("SAS"); + + /** + * Creates a new instance of PendingUploadCredentialType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PendingUploadCredentialType() { + } + + /** + * Creates or finds a PendingUploadCredentialType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PendingUploadCredentialType. + */ + @JsonCreator + public static PendingUploadCredentialType fromString(String name) { + return fromString(name, PendingUploadCredentialType.class); + } + + /** + * Gets known PendingUploadCredentialType values. + * + * @return known PendingUploadCredentialType values. + */ + public static Collection values() { + return values(PendingUploadCredentialType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java new file mode 100644 index 0000000000000..9a7919e4c98e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PendingUploadRequestDto model. */ +@Fluent +public final class PendingUploadRequestDto { + /* + * If PendingUploadId = null then random guid will be used. + */ + @JsonProperty(value = "pendingUploadId") + private String pendingUploadId; + + /* + * TemporaryBlobReference is the only supported type + */ + @JsonProperty(value = "pendingUploadType") + private PendingUploadType pendingUploadType; + + /** Creates an instance of PendingUploadRequestDto class. */ + public PendingUploadRequestDto() { + } + + /** + * Get the pendingUploadId property: If PendingUploadId = null then random guid will be used. + * + * @return the pendingUploadId value. + */ + public String pendingUploadId() { + return this.pendingUploadId; + } + + /** + * Set the pendingUploadId property: If PendingUploadId = null then random guid will be used. + * + * @param pendingUploadId the pendingUploadId value to set. + * @return the PendingUploadRequestDto object itself. + */ + public PendingUploadRequestDto withPendingUploadId(String pendingUploadId) { + this.pendingUploadId = pendingUploadId; + return this; + } + + /** + * Get the pendingUploadType property: TemporaryBlobReference is the only supported type. + * + * @return the pendingUploadType value. + */ + public PendingUploadType pendingUploadType() { + return this.pendingUploadType; + } + + /** + * Set the pendingUploadType property: TemporaryBlobReference is the only supported type. + * + * @param pendingUploadType the pendingUploadType value to set. + * @return the PendingUploadRequestDto object itself. + */ + public PendingUploadRequestDto withPendingUploadType(PendingUploadType pendingUploadType) { + this.pendingUploadType = pendingUploadType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java new file mode 100644 index 0000000000000..477fc75058cfb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; + +/** An immutable client-side representation of PendingUploadResponseDto. */ +public interface PendingUploadResponseDto { + /** + * Gets the blobReferenceForConsumption property: Container level read, write, list SAS. + * + * @return the blobReferenceForConsumption value. + */ + BlobReferenceForConsumptionDto blobReferenceForConsumption(); + + /** + * Gets the pendingUploadId property: ID for this upload request. + * + * @return the pendingUploadId value. + */ + String pendingUploadId(); + + /** + * Gets the pendingUploadType property: TemporaryBlobReference is the only supported type. + * + * @return the pendingUploadType value. + */ + PendingUploadType pendingUploadType(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner object. + * + * @return the inner object. + */ + PendingUploadResponseDtoInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java new file mode 100644 index 0000000000000..22f1e4abb5404 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of storage to use for the pending upload location. */ +public final class PendingUploadType extends ExpandableStringEnum { + /** Static value None for PendingUploadType. */ + public static final PendingUploadType NONE = fromString("None"); + + /** Static value TemporaryBlobReference for PendingUploadType. */ + public static final PendingUploadType TEMPORARY_BLOB_REFERENCE = fromString("TemporaryBlobReference"); + + /** + * Creates a new instance of PendingUploadType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PendingUploadType() { + } + + /** + * Creates or finds a PendingUploadType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PendingUploadType. + */ + @JsonCreator + public static PendingUploadType fromString(String name) { + return fromString(name, PendingUploadType.class); + } + + /** + * Gets known PendingUploadType values. + * + * @return known PendingUploadType values. + */ + public static Collection values() { + return values(PendingUploadType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java new file mode 100644 index 0000000000000..cff6d02a995bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PredictionDriftMetricThresholdBase model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "dataType", + defaultImpl = PredictionDriftMetricThresholdBase.class) +@JsonTypeName("PredictionDriftMetricThresholdBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Categorical", value = CategoricalPredictionDriftMetricThreshold.class), + @JsonSubTypes.Type(name = "Numerical", value = NumericalPredictionDriftMetricThreshold.class) +}) +@Fluent +public class PredictionDriftMetricThresholdBase { + /* + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @JsonProperty(value = "threshold") + private MonitoringThreshold threshold; + + /** Creates an instance of PredictionDriftMetricThresholdBase class. */ + public PredictionDriftMetricThresholdBase() { + } + + /** + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @return the threshold value. + */ + public MonitoringThreshold threshold() { + return this.threshold; + } + + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the PredictionDriftMetricThresholdBase object itself. + */ + public PredictionDriftMetricThresholdBase withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (threshold() != null) { + threshold().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java new file mode 100644 index 0000000000000..9b4617980a091 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** The PredictionDriftMonitoringSignal model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("PredictionDrift") +@Fluent +public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase { + /* + * A dictionary that maps feature names to their respective data types. + */ + @JsonProperty(value = "featureDataTypeOverride") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map featureDataTypeOverride; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /* + * [Required] The data which drift will be calculated for. + */ + @JsonProperty(value = "productionData", required = true) + private MonitoringInputDataBase productionData; + + /* + * [Required] The data to calculate drift against. + */ + @JsonProperty(value = "referenceData", required = true) + private MonitoringInputDataBase referenceData; + + /** Creates an instance of PredictionDriftMonitoringSignal class. */ + public PredictionDriftMonitoringSignal() { + } + + /** + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @return the featureDataTypeOverride value. + */ + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; + } + + /** + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @param featureDataTypeOverride the featureDataTypeOverride value to set. + * @return the PredictionDriftMonitoringSignal object itself. + */ + public PredictionDriftMonitoringSignal withFeatureDataTypeOverride( + Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; + return this; + } + + /** + * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the PredictionDriftMonitoringSignal object itself. + */ + public PredictionDriftMonitoringSignal withMetricThresholds( + List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** + * Get the productionData property: [Required] The data which drift will be calculated for. + * + * @return the productionData value. + */ + public MonitoringInputDataBase productionData() { + return this.productionData; + } + + /** + * Set the productionData property: [Required] The data which drift will be calculated for. + * + * @param productionData the productionData value to set. + * @return the PredictionDriftMonitoringSignal object itself. + */ + public PredictionDriftMonitoringSignal withProductionData(MonitoringInputDataBase productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the referenceData property: [Required] The data to calculate drift against. + * + * @return the referenceData value. + */ + public MonitoringInputDataBase referenceData() { + return this.referenceData; + } + + /** + * Set the referenceData property: [Required] The data to calculate drift against. + * + * @param referenceData the referenceData value to set. + * @return the PredictionDriftMonitoringSignal object itself. + */ + public PredictionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase referenceData) { + this.referenceData = referenceData; + return this; + } + + /** {@inheritDoc} */ + @Override + public PredictionDriftMonitoringSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public PredictionDriftMonitoringSignal withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (metricThresholds() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property metricThresholds in model PredictionDriftMonitoringSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + if (productionData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productionData in model PredictionDriftMonitoringSignal")); + } else { + productionData().validate(); + } + if (referenceData() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property referenceData in model PredictionDriftMonitoringSignal")); + } else { + referenceData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PredictionDriftMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java index 7d3cdfb6741b6..3a94648f8c19d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java @@ -9,19 +9,13 @@ /** The Private Endpoint resource. */ @Immutable -public final class PrivateEndpoint { +public class PrivateEndpoint { /* * The ARM identifier for Private Endpoint */ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /* - * The ARM identifier for Subnet resource that private endpoint links to - */ - @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) - private String subnetArmId; - /** Creates an instance of PrivateEndpoint class. */ public PrivateEndpoint() { } @@ -35,15 +29,6 @@ public String id() { return this.id; } - /** - * Get the subnetArmId property: The ARM identifier for Subnet resource that private endpoint links to. - * - * @return the subnetArmId value. - */ - public String subnetArmId() { - return this.subnetArmId; - } - /** * Validates the instance. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java index 18d85548f8cb2..9533359d4ecbe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java @@ -122,11 +122,13 @@ public interface PrivateEndpointConnection { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The PrivateEndpointConnection definition stages. */ interface DefinitionStages { /** The first stage of the PrivateEndpointConnection definition. */ interface Blank extends WithParentResource { } + /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -138,6 +140,7 @@ interface WithParentResource { */ WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** * The stage of the PrivateEndpointConnection 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. @@ -164,6 +167,7 @@ interface WithCreate */ PrivateEndpointConnection create(Context context); } + /** The stage of the PrivateEndpointConnection definition allowing to specify location. */ interface WithLocation { /** @@ -182,6 +186,7 @@ interface WithLocation { */ WithCreate withRegion(String location); } + /** The stage of the PrivateEndpointConnection definition allowing to specify tags. */ interface WithTags { /** @@ -192,6 +197,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the PrivateEndpointConnection definition allowing to specify identity. */ interface WithIdentity { /** @@ -202,6 +208,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the PrivateEndpointConnection definition allowing to specify sku. */ interface WithSku { /** @@ -212,6 +219,7 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ interface WithPrivateEndpoint { /** @@ -222,6 +230,7 @@ interface WithPrivateEndpoint { */ WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); } + /** * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. */ @@ -238,6 +247,7 @@ WithCreate withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState); } } + /** * Begins update for the PrivateEndpointConnection resource. * @@ -267,6 +277,7 @@ interface Update */ PrivateEndpointConnection apply(Context context); } + /** The PrivateEndpointConnection update stages. */ interface UpdateStages { /** The stage of the PrivateEndpointConnection update allowing to specify tags. */ @@ -279,6 +290,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the PrivateEndpointConnection update allowing to specify identity. */ interface WithIdentity { /** @@ -289,6 +301,7 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the PrivateEndpointConnection update allowing to specify sku. */ interface WithSku { /** @@ -299,6 +312,7 @@ interface WithSku { */ Update withSku(Sku sku); } + /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ interface WithPrivateEndpoint { /** @@ -309,6 +323,7 @@ interface WithPrivateEndpoint { */ Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); } + /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ interface WithPrivateLinkServiceConnectionState { /** @@ -323,6 +338,7 @@ Update withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java new file mode 100644 index 0000000000000..d64ab5549c889 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning + * workspace. + */ +@Fluent +public final class PrivateEndpointDestination { + /* + * The serviceResourceId property. + */ + @JsonProperty(value = "serviceResourceId") + private String serviceResourceId; + + /* + * The sparkEnabled property. + */ + @JsonProperty(value = "sparkEnabled") + private Boolean sparkEnabled; + + /* + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + @JsonProperty(value = "sparkStatus") + private RuleStatus sparkStatus; + + /* + * The subresourceTarget property. + */ + @JsonProperty(value = "subresourceTarget") + private String subresourceTarget; + + /** Creates an instance of PrivateEndpointDestination class. */ + public PrivateEndpointDestination() { + } + + /** + * Get the serviceResourceId property: The serviceResourceId property. + * + * @return the serviceResourceId value. + */ + public String serviceResourceId() { + return this.serviceResourceId; + } + + /** + * Set the serviceResourceId property: The serviceResourceId property. + * + * @param serviceResourceId the serviceResourceId value to set. + * @return the PrivateEndpointDestination object itself. + */ + public PrivateEndpointDestination withServiceResourceId(String serviceResourceId) { + this.serviceResourceId = serviceResourceId; + return this; + } + + /** + * Get the sparkEnabled property: The sparkEnabled property. + * + * @return the sparkEnabled value. + */ + public Boolean sparkEnabled() { + return this.sparkEnabled; + } + + /** + * Set the sparkEnabled property: The sparkEnabled property. + * + * @param sparkEnabled the sparkEnabled value to set. + * @return the PrivateEndpointDestination object itself. + */ + public PrivateEndpointDestination withSparkEnabled(Boolean sparkEnabled) { + this.sparkEnabled = sparkEnabled; + return this; + } + + /** + * Get the sparkStatus property: Type of a managed network Outbound Rule of a machine learning workspace. + * + * @return the sparkStatus value. + */ + public RuleStatus sparkStatus() { + return this.sparkStatus; + } + + /** + * Set the sparkStatus property: Type of a managed network Outbound Rule of a machine learning workspace. + * + * @param sparkStatus the sparkStatus value to set. + * @return the PrivateEndpointDestination object itself. + */ + public PrivateEndpointDestination withSparkStatus(RuleStatus sparkStatus) { + this.sparkStatus = sparkStatus; + return this; + } + + /** + * Get the subresourceTarget property: The subresourceTarget property. + * + * @return the subresourceTarget value. + */ + public String subresourceTarget() { + return this.subresourceTarget; + } + + /** + * Set the subresourceTarget property: The subresourceTarget property. + * + * @param subresourceTarget the subresourceTarget value to set. + * @return the PrivateEndpointDestination object itself. + */ + public PrivateEndpointDestination withSubresourceTarget(String subresourceTarget) { + this.subresourceTarget = subresourceTarget; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java new file mode 100644 index 0000000000000..9bdea77327c09 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Private Endpoint Outbound Rule for the managed network of a machine learning workspace. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("PrivateEndpoint") +@Fluent +public final class PrivateEndpointOutboundRule extends OutboundRule { + /* + * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning + * workspace. + */ + @JsonProperty(value = "destination") + private PrivateEndpointDestination destination; + + /** Creates an instance of PrivateEndpointOutboundRule class. */ + public PrivateEndpointOutboundRule() { + } + + /** + * Get the destination property: Private Endpoint destination for a Private Endpoint Outbound Rule for the managed + * network of a machine learning workspace. + * + * @return the destination value. + */ + public PrivateEndpointDestination destination() { + return this.destination; + } + + /** + * Set the destination property: Private Endpoint destination for a Private Endpoint Outbound Rule for the managed + * network of a machine learning workspace. + * + * @param destination the destination value to set. + * @return the PrivateEndpointOutboundRule object itself. + */ + public PrivateEndpointOutboundRule withDestination(PrivateEndpointDestination destination) { + this.destination = destination; + return this; + } + + /** {@inheritDoc} */ + @Override + public PrivateEndpointOutboundRule withCategory(RuleCategory category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public PrivateEndpointOutboundRule withStatus(RuleStatus status) { + super.withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java new file mode 100644 index 0000000000000..42e8760defa93 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PE network resource that is linked to this PE connection. */ +@Fluent +public final class PrivateEndpointResource extends PrivateEndpoint { + /* + * The subnetId that the private endpoint is connected to. + */ + @JsonProperty(value = "subnetArmId") + private String subnetArmId; + + /** Creates an instance of PrivateEndpointResource class. */ + public PrivateEndpointResource() { + } + + /** + * Get the subnetArmId property: The subnetId that the private endpoint is connected to. + * + * @return the subnetArmId value. + */ + public String subnetArmId() { + return this.subnetArmId; + } + + /** + * Set the subnetArmId property: The subnetId that the private endpoint is connected to. + * + * @param subnetArmId the subnetArmId value to set. + * @return the PrivateEndpointResource object itself. + */ + public PrivateEndpointResource withSubnetArmId(String subnetArmId) { + this.subnetArmId = subnetArmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java new file mode 100644 index 0000000000000..5ec7bb5a28f5d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Endpoint Communication Protocol + * + *

Protocol over which communication will happen over this endpoint. + */ +public final class Protocol extends ExpandableStringEnum { + /** Static value tcp for Protocol. */ + public static final Protocol TCP = fromString("tcp"); + + /** Static value udp for Protocol. */ + public static final Protocol UDP = fromString("udp"); + + /** Static value http for Protocol. */ + public static final Protocol HTTP = fromString("http"); + + /** + * Creates a new instance of Protocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Protocol() { + } + + /** + * Creates or finds a Protocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding Protocol. + */ + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); + } + + /** + * Gets known Protocol values. + * + * @return known Protocol values. + */ + public static Collection values() { + return values(Protocol.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java new file mode 100644 index 0000000000000..ca0b9cf60fa7b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The QueueSettings model. */ +@Fluent +public final class QueueSettings { + /* + * Controls the compute job tier + */ + @JsonProperty(value = "jobTier") + private JobTier jobTier; + + /** Creates an instance of QueueSettings class. */ + public QueueSettings() { + } + + /** + * Get the jobTier property: Controls the compute job tier. + * + * @return the jobTier value. + */ + public JobTier jobTier() { + return this.jobTier; + } + + /** + * Set the jobTier property: Controls the compute job tier. + * + * @param jobTier the jobTier value to set. + * @return the QueueSettings object itself. + */ + public QueueSettings withJobTier(JobTier jobTier) { + this.jobTier = jobTier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java new file mode 100644 index 0000000000000..84106a2876957 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workflow trigger recurrence for ComputeStartStop schedule type. */ +@Fluent +public final class Recurrence { + /* + * [Required] The frequency to trigger schedule. + */ + @JsonProperty(value = "frequency") + private ComputeRecurrenceFrequency frequency; + + /* + * [Required] Specifies schedule interval in conjunction with frequency + */ + @JsonProperty(value = "interval") + private Integer interval; + + /* + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * Specifies time zone in which the schedule runs. + * TimeZone should follow Windows time zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * [Required] The recurrence schedule. + */ + @JsonProperty(value = "schedule") + private ComputeRecurrenceSchedule schedule; + + /** Creates an instance of Recurrence class. */ + public Recurrence() { + } + + /** + * Get the frequency property: [Required] The frequency to trigger schedule. + * + * @return the frequency value. + */ + public ComputeRecurrenceFrequency frequency() { + return this.frequency; + } + + /** + * Set the frequency property: [Required] The frequency to trigger schedule. + * + * @param frequency the frequency value to set. + * @return the Recurrence object itself. + */ + public Recurrence withFrequency(ComputeRecurrenceFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @return the interval value. + */ + public Integer interval() { + return this.interval; + } + + /** + * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. + * + * @param interval the interval value to set. + * @return the Recurrence object itself. + */ + public Recurrence withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** + * Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format. + * + * @param startTime the startTime value to set. + * @return the Recurrence object itself. + */ + public Recurrence withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time + * zone format. Refer: + * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. + * + * @param timeZone the timeZone value to set. + * @return the Recurrence object itself. + */ + public Recurrence withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the schedule property: [Required] The recurrence schedule. + * + * @return the schedule value. + */ + public ComputeRecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: [Required] The recurrence schedule. + * + * @param schedule the schedule value to set. + * @return the Recurrence object itself. + */ + public Recurrence withSchedule(ComputeRecurrenceSchedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() != null) { + schedule().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java new file mode 100644 index 0000000000000..84eaec7c23ef3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.RegistryInner; + +/** Resource collection API of Registries. */ +public interface Registries { + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List registries by 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List registries. + * + * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + void deleteByResourceGroup(String resourceGroupName, String registryName); + + /** + * Delete registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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. + */ + void delete(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); + + /** + * Get registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 registry. + */ + Registry getByResourceGroup(String resourceGroupName, String registryName); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body); + + /** + * Remove regions from registry. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); + + /** + * Get registry. + * + * @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 registry along with {@link Response}. + */ + Registry getById(String id); + + /** + * Get registry. + * + * @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 registry along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete registry. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete registry. + * + * @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 Registry resource. + * + * @param name resource name. + * @return the first stage of the new Registry definition. + */ + Registry.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java new file mode 100644 index 0000000000000..b3feb12145abe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of Registry. */ +public interface Registry { + /** + * 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 identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the discoveryUrl property: Discovery URL for the Registry. + * + * @return the discoveryUrl value. + */ + String discoveryUrl(); + + /** + * Gets the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @return the intellectualPropertyPublisher value. + */ + String intellectualPropertyPublisher(); + + /** + * Gets the managedResourceGroup property: ResourceId of the managed RG if the registry has system created + * resources. + * + * @return the managedResourceGroup value. + */ + ArmResourceId managedResourceGroup(); + + /** + * Gets the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @return the mlFlowRegistryUri value. + */ + String mlFlowRegistryUri(); + + /** + * Gets the registryPrivateEndpointConnections property: Private endpoint connections info used for pending + * connections in private link portal. + * + * @return the registryPrivateEndpointConnections value. + */ + List registryPrivateEndpointConnections(); + + /** + * Gets the publicNetworkAccess property: Is the Registry accessible from the internet? Possible values: "Enabled" + * or "Disabled". + * + * @return the publicNetworkAccess value. + */ + String publicNetworkAccess(); + + /** + * Gets the regionDetails property: Details of each region the registry is in. + * + * @return the regionDetails value. + */ + List regionDetails(); + + /** + * 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.machinelearning.fluent.models.RegistryInner object. + * + * @return the inner object. + */ + RegistryInner innerModel(); + + /** The entirety of the Registry definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The Registry definition stages. */ + interface DefinitionStages { + /** The first stage of the Registry definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the Registry 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 Registry 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 Registry definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithKind, + DefinitionStages.WithSku, + DefinitionStages.WithDiscoveryUrl, + DefinitionStages.WithIntellectualPropertyPublisher, + DefinitionStages.WithManagedResourceGroup, + DefinitionStages.WithMlFlowRegistryUri, + DefinitionStages.WithRegistryPrivateEndpointConnections, + DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithRegionDetails { + /** + * Executes the create request. + * + * @return the created resource. + */ + Registry create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Registry create(Context context); + } + + /** The stage of the Registry 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 Registry definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** The stage of the Registry definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** The stage of the Registry definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + + /** The stage of the Registry definition allowing to specify discoveryUrl. */ + interface WithDiscoveryUrl { + /** + * Specifies the discoveryUrl property: Discovery URL for the Registry. + * + * @param discoveryUrl Discovery URL for the Registry. + * @return the next definition stage. + */ + WithCreate withDiscoveryUrl(String discoveryUrl); + } + + /** The stage of the Registry definition allowing to specify intellectualPropertyPublisher. */ + interface WithIntellectualPropertyPublisher { + /** + * Specifies the intellectualPropertyPublisher property: IntellectualPropertyPublisher for the registry. + * + * @param intellectualPropertyPublisher IntellectualPropertyPublisher for the registry. + * @return the next definition stage. + */ + WithCreate withIntellectualPropertyPublisher(String intellectualPropertyPublisher); + } + + /** The stage of the Registry definition allowing to specify managedResourceGroup. */ + interface WithManagedResourceGroup { + /** + * Specifies the managedResourceGroup property: ResourceId of the managed RG if the registry has system + * created resources. + * + * @param managedResourceGroup ResourceId of the managed RG if the registry has system created resources. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroup(ArmResourceId managedResourceGroup); + } + + /** The stage of the Registry definition allowing to specify mlFlowRegistryUri. */ + interface WithMlFlowRegistryUri { + /** + * Specifies the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. + * + * @param mlFlowRegistryUri MLFlow Registry URI for the Registry. + * @return the next definition stage. + */ + WithCreate withMlFlowRegistryUri(String mlFlowRegistryUri); + } + + /** The stage of the Registry definition allowing to specify registryPrivateEndpointConnections. */ + interface WithRegistryPrivateEndpointConnections { + /** + * Specifies the registryPrivateEndpointConnections property: Private endpoint connections info used for + * pending connections in private link portal. + * + * @param registryPrivateEndpointConnections Private endpoint connections info used for pending connections + * in private link portal. + * @return the next definition stage. + */ + WithCreate withRegistryPrivateEndpointConnections( + List registryPrivateEndpointConnections); + } + + /** The stage of the Registry definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Is the Registry accessible from the internet? Possible + * values: "Enabled" or "Disabled". + * + * @param publicNetworkAccess Is the Registry accessible from the internet? Possible values: "Enabled" or + * "Disabled". + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(String publicNetworkAccess); + } + + /** The stage of the Registry definition allowing to specify regionDetails. */ + interface WithRegionDetails { + /** + * Specifies the regionDetails property: Details of each region the registry is in. + * + * @param regionDetails Details of each region the registry is in. + * @return the next definition stage. + */ + WithCreate withRegionDetails(List regionDetails); + } + } + + /** + * Begins update for the Registry resource. + * + * @return the stage of resource update. + */ + Registry.Update update(); + + /** The template for Registry update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Registry apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Registry apply(Context context); + } + + /** The Registry update stages. */ + interface UpdateStages { + /** The stage of the Registry 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 Registry update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + Update withIdentity(RegistryPartialManagedServiceIdentity identity); + } + + /** The stage of the Registry update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + Update withSku(PartialSku sku); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Registry refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Registry refresh(Context context); + + /** + * Remove regions from registry. + * + * @param body Details required to create the registry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Registry removeRegions(RegistryInner body); + + /** + * Remove regions from registry. + * + * @param body Details required to create the registry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Registry removeRegions(RegistryInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java new file mode 100644 index 0000000000000..dc521fa5e5d09 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryCodeContainers. */ +public interface RegistryCodeContainers { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName); + + /** + * Delete Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, Context context); + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, Context context); + + /** + * Get Code container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return code container. + */ + CodeContainer get(String resourceGroupName, String registryName, String codeName); + + /** + * Get Code container. + * + * @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 code container along with {@link Response}. + */ + CodeContainer getById(String id); + + /** + * Get Code container. + * + * @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 code container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Code container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete Code container. + * + * @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 CodeContainer resource. + * + * @param name resource name. + * @return the first stage of the new CodeContainer definition. + */ + CodeContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java new file mode 100644 index 0000000000000..30336a7a73263 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryCodeVersions. */ +public interface RegistryCodeVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String codeName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String codeName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String codeName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + CodeVersion get(String resourceGroupName, String registryName, String codeName, String version); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String codeName, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a code asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Pending upload name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + CodeVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 CodeVersion resource. + * + * @param name resource name. + * @return the first stage of the new CodeVersion definition. + */ + CodeVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java new file mode 100644 index 0000000000000..51f95a4ae8acc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryComponentContainers. */ +public interface RegistryComponentContainers { + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + ComponentContainer get(String resourceGroupName, String registryName, String componentName); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + ComponentContainer getById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 ComponentContainer resource. + * + * @param name resource name. + * @return the first stage of the new ComponentContainer definition. + */ + ComponentContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java new file mode 100644 index 0000000000000..923c002c236a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.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.machinelearning.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 RegistryComponentVersions. */ +public interface RegistryComponentVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String componentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String componentName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String componentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + ComponentVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 ComponentVersion resource. + * + * @param name resource name. + * @return the first stage of the new ComponentVersion definition. + */ + ComponentVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java new file mode 100644 index 0000000000000..3fccf1454f85f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryDataContainers. */ +public interface RegistryDataContainers { + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List Data containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String name, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + DataContainer get(String resourceGroupName, String registryName, String name); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + DataContainer getById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 DataContainer resource. + * + * @param name resource name. + * @return the first stage of the new DataContainer definition. + */ + DataContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java new file mode 100644 index 0000000000000..a7ffb98452cc8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.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.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of RegistryDataReferences. */ +public interface RegistryDataReferences { + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri along with {@link Response}. + */ + Response getBlobReferenceSasWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + GetBlobReferenceSasRequestDto body, + Context context); + + /** + * Get blob reference SAS Uri. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data reference name. + * @param version Version identifier. + * @param body Asset id and blob uri. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob reference SAS Uri. + */ + GetBlobReferenceSasResponseDto getBlobReferenceSas( + String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java new file mode 100644 index 0000000000000..34957a2aed037 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryDataVersions. */ +public interface RegistryDataVersions { + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String name); + + /** + * List data versions in the data container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data container's name. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, + * results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String name, + String orderBy, + Integer top, + String skip, + String tags, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String name, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + DataVersionBase get(String resourceGroupName, String registryName, String name, String version); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String name, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a data asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Data asset name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + DataVersionBase getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 DataVersionBase resource. + * + * @param name resource name. + * @return the first stage of the new DataVersionBase definition. + */ + DataVersionBase.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java new file mode 100644 index 0000000000000..d26d95522ec15 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryEnvironmentContainers. */ +public interface RegistryEnvironmentContainers { + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List environment containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + EnvironmentContainer getById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 EnvironmentContainer resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentContainer definition. + */ + EnvironmentContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java new file mode 100644 index 0000000000000..a7194a2dcd591 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.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.machinelearning.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 RegistryEnvironmentVersions. */ +public interface RegistryEnvironmentVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String environmentName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String environmentName, + String orderBy, + Integer top, + String skip, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String environmentName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, String version); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + EnvironmentVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 EnvironmentVersion resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentVersion definition. + */ + EnvironmentVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java new file mode 100644 index 0000000000000..1c54f71a0b248 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryModelContainers. */ +public interface RegistryModelContainers { + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName); + + /** + * List model containers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String registryName, String skip, ListViewType listViewType, Context context); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName); + + /** + * Delete container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, Context context); + + /** + * Get container. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container. + */ + ModelContainer get(String resourceGroupName, String registryName, String modelName); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + ModelContainer getById(String id); + + /** + * Get container. + * + * @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 container along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete container. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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 ModelContainer resource. + * + * @param name resource name. + * @return the first stage of the new ModelContainer definition. + */ + ModelContainer.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java new file mode 100644 index 0000000000000..baf689e7663d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegistryModelVersions. */ +public interface RegistryModelVersions { + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String modelName); + + /** + * List versions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Version identifier. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String registryName, + String modelName, + String skip, + String orderBy, + Integer top, + String version, + String description, + String tags, + String properties, + ListViewType listViewType, + Context context); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, String version); + + /** + * Delete version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. + * @param version Version identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String registryName, String modelName, String version, Context context); + + /** + * Get version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return version. + */ + ModelVersion get(String resourceGroupName, String registryName, String modelName, String version); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrGetStartPendingUploadWithResponse( + String resourceGroupName, + String registryName, + String modelName, + String version, + PendingUploadRequestDto body, + Context context); + + /** + * Generate a storage location and credential for the client to upload a model asset to. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Model name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Pending upload request object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PendingUploadResponseDto createOrGetStartPendingUpload( + String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + ModelVersion getById(String id); + + /** + * Get version. + * + * @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 version along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete version. + * + * @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 ModelVersion resource. + * + * @param name resource name. + * @return the first stage of the new ModelVersion definition. + */ + ModelVersion.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java new file mode 100644 index 0000000000000..47e063fb9a6e1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import java.util.Map; + +/** Managed service identity (system assigned and/or user assigned identities). */ +@Fluent +public final class RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { + /** Creates an instance of RegistryPartialManagedServiceIdentity class. */ + public RegistryPartialManagedServiceIdentity() { + } + + /** {@inheritDoc} */ + @Override + public RegistryPartialManagedServiceIdentity withType(ManagedServiceIdentityType type) { + super.withType(type); + return this; + } + + /** {@inheritDoc} */ + @Override + public RegistryPartialManagedServiceIdentity withUserAssignedIdentities( + Map userAssignedIdentities) { + super.withUserAssignedIdentities(userAssignedIdentities); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java new file mode 100644 index 0000000000000..bf5fb5ea9418e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Private endpoint connection definition. */ +@Fluent +public final class RegistryPrivateEndpointConnection { + /* + * This is the private endpoint connection name created on SRP + * Full resource id: + * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName} + */ + @JsonProperty(value = "id") + private String id; + + /* + * Same as workspace location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Properties of the Private Endpoint Connection + */ + @JsonProperty(value = "properties") + private RegistryPrivateEndpointConnectionProperties innerProperties; + + /** Creates an instance of RegistryPrivateEndpointConnection class. */ + public RegistryPrivateEndpointConnection() { + } + + /** + * Get the id property: This is the private endpoint connection name created on SRP Full resource id: + * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: This is the private endpoint connection name created on SRP Full resource id: + * /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/registryPrivateEndpointConnections/{peConnectionName}. + * + * @param id the id value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withId(String id) { + this.id = id; + return this; + } + + /** + * Get the location property: Same as workspace location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Same as workspace location. + * + * @param location the location value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Properties of the Private Endpoint Connection. + * + * @return the innerProperties value. + */ + private RegistryPrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the groupIds property: The group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + + /** + * Set the groupIds property: The group ids. + * + * @param groupIds the groupIds value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withGroupIds(List groupIds) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); + } + this.innerProperties().withGroupIds(groupIds); + return this; + } + + /** + * Get the privateEndpoint property: The PE network resource that is linked to this PE connection. + * + * @return the privateEndpoint value. + */ + public PrivateEndpointResource privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The PE network resource that is linked to this PE connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withPrivateEndpoint(PrivateEndpointResource privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the registryPrivateLinkServiceConnectionState property: The connection state. + * + * @return the registryPrivateLinkServiceConnectionState value. + */ + public RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState() { + return this.innerProperties() == null + ? null + : this.innerProperties().registryPrivateLinkServiceConnectionState(); + } + + /** + * Set the registryPrivateLinkServiceConnectionState property: The connection state. + * + * @param registryPrivateLinkServiceConnectionState the registryPrivateLinkServiceConnectionState value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withRegistryPrivateLinkServiceConnectionState( + RegistryPrivateLinkServiceConnectionState registryPrivateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); + } + this.innerProperties().withRegistryPrivateLinkServiceConnectionState(registryPrivateLinkServiceConnectionState); + return this; + } + + /** + * Get the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's + * null. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's + * null. + * + * @param provisioningState the provisioningState value to set. + * @return the RegistryPrivateEndpointConnection object itself. + */ + public RegistryPrivateEndpointConnection withProvisioningState(String provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryPrivateEndpointConnectionProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..246fa3e53848e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The connection state. */ +@Fluent +public final class RegistryPrivateLinkServiceConnectionState { + /* + * Some RP chose "None". Other RPs use this for region expansion. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /* + * User-defined message that, per NRP doc, may be used for approval-related message. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Connection status of the service consumer with the service provider + */ + @JsonProperty(value = "status") + private EndpointServiceConnectionStatus status; + + /** Creates an instance of RegistryPrivateLinkServiceConnectionState class. */ + public RegistryPrivateLinkServiceConnectionState() { + } + + /** + * Get the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. + * + * @param actionsRequired the actionsRequired value to set. + * @return the RegistryPrivateLinkServiceConnectionState object itself. + */ + public RegistryPrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * Get the description property: User-defined message that, per NRP doc, may be used for approval-related message. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: User-defined message that, per NRP doc, may be used for approval-related message. + * + * @param description the description value to set. + * @return the RegistryPrivateLinkServiceConnectionState object itself. + */ + public RegistryPrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the status property: Connection status of the service consumer with the service provider. + * + * @return the status value. + */ + public EndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Connection status of the service consumer with the service provider. + * + * @param status the status value to set. + * @return the RegistryPrivateLinkServiceConnectionState object itself. + */ + public RegistryPrivateLinkServiceConnectionState withStatus(EndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java new file mode 100644 index 0000000000000..3be9195b27153 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Details for each region the registry is in. */ +@Fluent +public final class RegistryRegionArmDetails { + /* + * List of ACR accounts + */ + @JsonProperty(value = "acrDetails") + private List acrDetails; + + /* + * The location where the registry exists + */ + @JsonProperty(value = "location") + private String location; + + /* + * List of storage accounts + */ + @JsonProperty(value = "storageAccountDetails") + private List storageAccountDetails; + + /** Creates an instance of RegistryRegionArmDetails class. */ + public RegistryRegionArmDetails() { + } + + /** + * Get the acrDetails property: List of ACR accounts. + * + * @return the acrDetails value. + */ + public List acrDetails() { + return this.acrDetails; + } + + /** + * Set the acrDetails property: List of ACR accounts. + * + * @param acrDetails the acrDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withAcrDetails(List acrDetails) { + this.acrDetails = acrDetails; + return this; + } + + /** + * Get the location property: The location where the registry exists. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location where the registry exists. + * + * @param location the location value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the storageAccountDetails property: List of storage accounts. + * + * @return the storageAccountDetails value. + */ + public List storageAccountDetails() { + return this.storageAccountDetails; + } + + /** + * Set the storageAccountDetails property: List of storage accounts. + * + * @param storageAccountDetails the storageAccountDetails value to set. + * @return the RegistryRegionArmDetails object itself. + */ + public RegistryRegionArmDetails withStorageAccountDetails(List storageAccountDetails) { + this.storageAccountDetails = storageAccountDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (acrDetails() != null) { + acrDetails().forEach(e -> e.validate()); + } + if (storageAccountDetails() != null) { + storageAccountDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..a37b57eb6d41e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of Registry entities. */ +@Fluent +public final class RegistryTrackedResourceArmPaginatedResult { + /* + * The link to the next page of Registry objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type Registry. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of RegistryTrackedResourceArmPaginatedResult class. */ + public RegistryTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type Registry. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type Registry. + * + * @param value the value value to set. + * @return the RegistryTrackedResourceArmPaginatedResult object itself. + */ + public RegistryTrackedResourceArmPaginatedResult 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) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java new file mode 100644 index 0000000000000..7f344b400148b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; +import java.util.Map; + +/** Rolling input data definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputDataType") +@JsonTypeName("Rolling") +@Fluent +public final class RollingInputData extends MonitoringInputDataBase { + /* + * Reference to the component asset used to preprocess the data. + */ + @JsonProperty(value = "preprocessingComponentId") + private String preprocessingComponentId; + + /* + * [Required] The time offset between the end of the data window and the monitor's current run time. + */ + @JsonProperty(value = "windowOffset", required = true) + private Duration windowOffset; + + /* + * [Required] The size of the rolling data window. + */ + @JsonProperty(value = "windowSize", required = true) + private Duration windowSize; + + /** Creates an instance of RollingInputData class. */ + public RollingInputData() { + } + + /** + * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @param preprocessingComponentId the preprocessingComponentId value to set. + * @return the RollingInputData object itself. + */ + public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { + this.preprocessingComponentId = preprocessingComponentId; + return this; + } + + /** + * Get the windowOffset property: [Required] The time offset between the end of the data window and the monitor's + * current run time. + * + * @return the windowOffset value. + */ + public Duration windowOffset() { + return this.windowOffset; + } + + /** + * Set the windowOffset property: [Required] The time offset between the end of the data window and the monitor's + * current run time. + * + * @param windowOffset the windowOffset value to set. + * @return the RollingInputData object itself. + */ + public RollingInputData withWindowOffset(Duration windowOffset) { + this.windowOffset = windowOffset; + return this; + } + + /** + * Get the windowSize property: [Required] The size of the rolling data window. + * + * @return the windowSize value. + */ + public Duration windowSize() { + return this.windowSize; + } + + /** + * Set the windowSize property: [Required] The size of the rolling data window. + * + * @param windowSize the windowSize value to set. + * @return the RollingInputData object itself. + */ + public RollingInputData withWindowSize(Duration windowSize) { + this.windowSize = windowSize; + return this; + } + + /** {@inheritDoc} */ + @Override + public RollingInputData withColumns(Map columns) { + super.withColumns(columns); + return this; + } + + /** {@inheritDoc} */ + @Override + public RollingInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); + return this; + } + + /** {@inheritDoc} */ + @Override + public RollingInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); + return this; + } + + /** {@inheritDoc} */ + @Override + public RollingInputData withUri(String uri) { + super.withUri(uri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (windowOffset() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property windowOffset in model RollingInputData")); + } + if (windowSize() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property windowSize in model RollingInputData")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RollingInputData.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java new file mode 100644 index 0000000000000..06c12d0ac675b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The action enum for networking rule. */ +public final class RuleAction extends ExpandableStringEnum { + /** Static value Allow for RuleAction. */ + public static final RuleAction ALLOW = fromString("Allow"); + + /** Static value Deny for RuleAction. */ + public static final RuleAction DENY = fromString("Deny"); + + /** + * Creates a new instance of RuleAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleAction() { + } + + /** + * Creates or finds a RuleAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleAction. + */ + @JsonCreator + public static RuleAction fromString(String name) { + return fromString(name, RuleAction.class); + } + + /** + * Gets known RuleAction values. + * + * @return known RuleAction values. + */ + public static Collection values() { + return values(RuleAction.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java new file mode 100644 index 0000000000000..86ef6d8a2659d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Category of a managed network Outbound Rule of a machine learning workspace. */ +public final class RuleCategory extends ExpandableStringEnum { + /** Static value Required for RuleCategory. */ + public static final RuleCategory REQUIRED = fromString("Required"); + + /** Static value Recommended for RuleCategory. */ + public static final RuleCategory RECOMMENDED = fromString("Recommended"); + + /** Static value UserDefined for RuleCategory. */ + public static final RuleCategory USER_DEFINED = fromString("UserDefined"); + + /** + * Creates a new instance of RuleCategory value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleCategory() { + } + + /** + * Creates or finds a RuleCategory from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleCategory. + */ + @JsonCreator + public static RuleCategory fromString(String name) { + return fromString(name, RuleCategory.class); + } + + /** + * Gets known RuleCategory values. + * + * @return known RuleCategory values. + */ + public static Collection values() { + return values(RuleCategory.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java new file mode 100644 index 0000000000000..df21146129af6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of a managed network Outbound Rule of a machine learning workspace. */ +public final class RuleStatus extends ExpandableStringEnum { + /** Static value Inactive for RuleStatus. */ + public static final RuleStatus INACTIVE = fromString("Inactive"); + + /** Static value Active for RuleStatus. */ + public static final RuleStatus ACTIVE = fromString("Active"); + + /** + * Creates a new instance of RuleStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleStatus() { + } + + /** + * Creates or finds a RuleStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleStatus. + */ + @JsonCreator + public static RuleStatus fromString(String name) { + return fromString(name, RuleStatus.class); + } + + /** + * Gets known RuleStatus values. + * + * @return known RuleStatus values. + */ + public static Collection values() { + return values(RuleStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java new file mode 100644 index 0000000000000..3d24ede6d6eb2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of a managed network Outbound Rule of a machine learning workspace. */ +public final class RuleType extends ExpandableStringEnum { + /** Static value FQDN for RuleType. */ + public static final RuleType FQDN = fromString("FQDN"); + + /** Static value PrivateEndpoint for RuleType. */ + public static final RuleType PRIVATE_ENDPOINT = fromString("PrivateEndpoint"); + + /** Static value ServiceTag for RuleType. */ + public static final RuleType SERVICE_TAG = fromString("ServiceTag"); + + /** + * Creates a new instance of RuleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleType() { + } + + /** + * Creates or finds a RuleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleType. + */ + @JsonCreator + public static RuleType fromString(String name) { + return fromString(name, RuleType.class); + } + + /** + * Gets known RuleType values. + * + * @return known RuleType values. + */ + public static Collection values() { + return values(RuleType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java new file mode 100644 index 0000000000000..6e4e44c9f4fdd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Access with full SAS uri. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialType") +@JsonTypeName("SAS") +@Fluent +public final class SasCredential extends DataReferenceCredential { + /* + * Full SAS Uri, including the storage, container/blob path and SAS token + */ + @JsonProperty(value = "sasUri") + private String sasUri; + + /** Creates an instance of SasCredential class. */ + public SasCredential() { + } + + /** + * Get the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. + * + * @return the sasUri value. + */ + public String sasUri() { + return this.sasUri; + } + + /** + * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. + * + * @param sasUri the sasUri value to set. + * @return the SasCredential object itself. + */ + public SasCredential withSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java new file mode 100644 index 0000000000000..65cb3099c524b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The SasCredentialDto model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialType") +@JsonTypeName("SAS") +@Fluent +public final class SasCredentialDto extends PendingUploadCredentialDto { + /* + * Full SAS Uri, including the storage, container/blob path and SAS token + */ + @JsonProperty(value = "sasUri") + private String sasUri; + + /** Creates an instance of SasCredentialDto class. */ + public SasCredentialDto() { + } + + /** + * Get the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. + * + * @return the sasUri value. + */ + public String sasUri() { + return this.sasUri; + } + + /** + * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. + * + * @param sasUri the sasUri value to set. + * @return the SasCredentialDto object itself. + */ + public SasCredentialDto withSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java index 81edf1559396e..26f73fca2b2b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java @@ -18,7 +18,7 @@ public final class SasDatastoreCredentials extends DatastoreCredentials { /* * [Required] Storage container secrets. */ - @JsonProperty(value = "secrets", required = true) + @JsonProperty(value = "secrets") private SasDatastoreSecrets secrets; /** Creates an instance of SasDatastoreCredentials class. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java index 7808d864dab94..9d41495441afc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java @@ -66,11 +66,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The Schedule definition stages. */ interface DefinitionStages { /** The first stage of the Schedule definition. */ interface Blank extends WithParentResource { } + /** The stage of the Schedule definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -82,6 +84,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the Schedule definition allowing to specify properties. */ interface WithProperties { /** @@ -92,6 +95,7 @@ interface WithProperties { */ WithCreate withProperties(ScheduleProperties properties); } + /** * The stage of the Schedule 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. @@ -113,6 +117,7 @@ interface WithCreate { Schedule create(Context context); } } + /** * Begins update for the Schedule resource. * @@ -137,6 +142,7 @@ interface Update extends UpdateStages.WithProperties { */ Schedule apply(Context context); } + /** The Schedule update stages. */ interface UpdateStages { /** The stage of the Schedule update allowing to specify properties. */ @@ -150,6 +156,7 @@ interface WithProperties { Update withProperties(ScheduleProperties properties); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java index d88932a1d1c21..2772809d67268 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java @@ -17,6 +17,7 @@ defaultImpl = ScheduleActionBase.class) @JsonTypeName("ScheduleActionBase") @JsonSubTypes({ + @JsonSubTypes.Type(name = "CreateMonitor", value = CreateMonitorAction.class), @JsonSubTypes.Type(name = "InvokeBatchEndpoint", value = EndpointScheduleAction.class), @JsonSubTypes.Type(name = "CreateJob", value = JobScheduleAction.class) }) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java index 24fe002c87045..49a64a7f59912 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java @@ -16,6 +16,9 @@ public final class ScheduleActionType extends ExpandableStringEnum addressPrefixes; + + /* + * The portRanges property. + */ + @JsonProperty(value = "portRanges") + private String portRanges; + + /* + * The protocol property. + */ + @JsonProperty(value = "protocol") + private String protocol; + + /* + * The serviceTag property. + */ + @JsonProperty(value = "serviceTag") + private String serviceTag; + + /** Creates an instance of ServiceTagDestination class. */ + public ServiceTagDestination() { + } + + /** + * Get the action property: The action enum for networking rule. + * + * @return the action value. + */ + public RuleAction action() { + return this.action; + } + + /** + * Set the action property: The action enum for networking rule. + * + * @param action the action value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withAction(RuleAction action) { + this.action = action; + return this; + } + + /** + * Get the addressPrefixes property: Optional, if provided, the ServiceTag property will be ignored. + * + * @return the addressPrefixes value. + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Get the portRanges property: The portRanges property. + * + * @return the portRanges value. + */ + public String portRanges() { + return this.portRanges; + } + + /** + * Set the portRanges property: The portRanges property. + * + * @param portRanges the portRanges value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withPortRanges(String portRanges) { + this.portRanges = portRanges; + return this; + } + + /** + * Get the protocol property: The protocol property. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol property. + * + * @param protocol the protocol value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the serviceTag property: The serviceTag property. + * + * @return the serviceTag value. + */ + public String serviceTag() { + return this.serviceTag; + } + + /** + * Set the serviceTag property: The serviceTag property. + * + * @param serviceTag the serviceTag value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withServiceTag(String serviceTag) { + this.serviceTag = serviceTag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java new file mode 100644 index 0000000000000..3cd7688bc80a5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Service Tag Outbound Rule for the managed network of a machine learning workspace. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("ServiceTag") +@Fluent +public final class ServiceTagOutboundRule extends OutboundRule { + /* + * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + */ + @JsonProperty(value = "destination") + private ServiceTagDestination destination; + + /** Creates an instance of ServiceTagOutboundRule class. */ + public ServiceTagOutboundRule() { + } + + /** + * Get the destination property: Service Tag destination for a Service Tag Outbound Rule for the managed network of + * a machine learning workspace. + * + * @return the destination value. + */ + public ServiceTagDestination destination() { + return this.destination; + } + + /** + * Set the destination property: Service Tag destination for a Service Tag Outbound Rule for the managed network of + * a machine learning workspace. + * + * @param destination the destination value to set. + * @return the ServiceTagOutboundRule object itself. + */ + public ServiceTagOutboundRule withDestination(ServiceTagDestination destination) { + this.destination = destination; + return this; + } + + /** {@inheritDoc} */ + @Override + public ServiceTagOutboundRule withCategory(RuleCategory category) { + super.withCategory(category); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServiceTagOutboundRule withStatus(RuleStatus status) { + super.withStatus(status); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java new file mode 100644 index 0000000000000..fd1c5de0f56e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Static input data definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputDataType") +@JsonTypeName("Static") +@Fluent +public final class StaticInputData extends MonitoringInputDataBase { + /* + * Reference to the component asset used to preprocess the data. + */ + @JsonProperty(value = "preprocessingComponentId") + private String preprocessingComponentId; + + /* + * [Required] The end date of the data window. + */ + @JsonProperty(value = "windowEnd", required = true) + private OffsetDateTime windowEnd; + + /* + * [Required] The start date of the data window. + */ + @JsonProperty(value = "windowStart", required = true) + private OffsetDateTime windowStart; + + /** Creates an instance of StaticInputData class. */ + public StaticInputData() { + } + + /** + * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @param preprocessingComponentId the preprocessingComponentId value to set. + * @return the StaticInputData object itself. + */ + public StaticInputData withPreprocessingComponentId(String preprocessingComponentId) { + this.preprocessingComponentId = preprocessingComponentId; + return this; + } + + /** + * Get the windowEnd property: [Required] The end date of the data window. + * + * @return the windowEnd value. + */ + public OffsetDateTime windowEnd() { + return this.windowEnd; + } + + /** + * Set the windowEnd property: [Required] The end date of the data window. + * + * @param windowEnd the windowEnd value to set. + * @return the StaticInputData object itself. + */ + public StaticInputData withWindowEnd(OffsetDateTime windowEnd) { + this.windowEnd = windowEnd; + return this; + } + + /** + * Get the windowStart property: [Required] The start date of the data window. + * + * @return the windowStart value. + */ + public OffsetDateTime windowStart() { + return this.windowStart; + } + + /** + * Set the windowStart property: [Required] The start date of the data window. + * + * @param windowStart the windowStart value to set. + * @return the StaticInputData object itself. + */ + public StaticInputData withWindowStart(OffsetDateTime windowStart) { + this.windowStart = windowStart; + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticInputData withColumns(Map columns) { + super.withColumns(columns); + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticInputData withUri(String uri) { + super.withUri(uri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (windowEnd() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property windowEnd in model StaticInputData")); + } + if (windowStart() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property windowStart in model StaticInputData")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(StaticInputData.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java new file mode 100644 index 0000000000000..cbbc66bcece7b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of storage account to be used for the Registry. */ +@Fluent +public final class StorageAccountDetails { + /* + * Details of system created storage account to be used for the registry + */ + @JsonProperty(value = "systemCreatedStorageAccount") + private SystemCreatedStorageAccount systemCreatedStorageAccount; + + /* + * Details of user created storage account to be used for the registry + */ + @JsonProperty(value = "userCreatedStorageAccount") + private UserCreatedStorageAccount userCreatedStorageAccount; + + /** Creates an instance of StorageAccountDetails class. */ + public StorageAccountDetails() { + } + + /** + * Get the systemCreatedStorageAccount property: Details of system created storage account to be used for the + * registry. + * + * @return the systemCreatedStorageAccount value. + */ + public SystemCreatedStorageAccount systemCreatedStorageAccount() { + return this.systemCreatedStorageAccount; + } + + /** + * Set the systemCreatedStorageAccount property: Details of system created storage account to be used for the + * registry. + * + * @param systemCreatedStorageAccount the systemCreatedStorageAccount value to set. + * @return the StorageAccountDetails object itself. + */ + public StorageAccountDetails withSystemCreatedStorageAccount( + SystemCreatedStorageAccount systemCreatedStorageAccount) { + this.systemCreatedStorageAccount = systemCreatedStorageAccount; + return this; + } + + /** + * Get the userCreatedStorageAccount property: Details of user created storage account to be used for the registry. + * + * @return the userCreatedStorageAccount value. + */ + public UserCreatedStorageAccount userCreatedStorageAccount() { + return this.userCreatedStorageAccount; + } + + /** + * Set the userCreatedStorageAccount property: Details of user created storage account to be used for the registry. + * + * @param userCreatedStorageAccount the userCreatedStorageAccount value to set. + * @return the StorageAccountDetails object itself. + */ + public StorageAccountDetails withUserCreatedStorageAccount(UserCreatedStorageAccount userCreatedStorageAccount) { + this.userCreatedStorageAccount = userCreatedStorageAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (systemCreatedStorageAccount() != null) { + systemCreatedStorageAccount().validate(); + } + if (userCreatedStorageAccount() != null) { + userCreatedStorageAccount().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java index 0a72071e3d48f..47ee522da13da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java @@ -49,6 +49,12 @@ public final class SweepJob extends JobBaseProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map outputs; + /* + * Queue settings for the job + */ + @JsonProperty(value = "queueSettings") + private QueueSettings queueSettings; + /* * [Required] The hyperparameter sampling algorithm */ @@ -174,6 +180,26 @@ public SweepJob withOutputs(Map outputs) { return this; } + /** + * Get the queueSettings property: Queue settings for the job. + * + * @return the queueSettings value. + */ + public QueueSettings queueSettings() { + return this.queueSettings; + } + + /** + * Set the queueSettings property: Queue settings for the job. + * + * @param queueSettings the queueSettings value to set. + * @return the SweepJob object itself. + */ + public SweepJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + /** * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. * @@ -347,6 +373,9 @@ public void validate() { } }); } + if (queueSettings() != null) { + queueSettings().validate(); + } if (samplingAlgorithm() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java new file mode 100644 index 0000000000000..45e284f923607 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SystemCreatedAcrAccount model. */ +@Fluent +public final class SystemCreatedAcrAccount { + /* + * Name of the ACR account + */ + @JsonProperty(value = "acrAccountName") + private String acrAccountName; + + /* + * SKU of the ACR account + */ + @JsonProperty(value = "acrAccountSku") + private String acrAccountSku; + + /* + * This is populated once the ACR account is created. + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** Creates an instance of SystemCreatedAcrAccount class. */ + public SystemCreatedAcrAccount() { + } + + /** + * Get the acrAccountName property: Name of the ACR account. + * + * @return the acrAccountName value. + */ + public String acrAccountName() { + return this.acrAccountName; + } + + /** + * Set the acrAccountName property: Name of the ACR account. + * + * @param acrAccountName the acrAccountName value to set. + * @return the SystemCreatedAcrAccount object itself. + */ + public SystemCreatedAcrAccount withAcrAccountName(String acrAccountName) { + this.acrAccountName = acrAccountName; + return this; + } + + /** + * Get the acrAccountSku property: SKU of the ACR account. + * + * @return the acrAccountSku value. + */ + public String acrAccountSku() { + return this.acrAccountSku; + } + + /** + * Set the acrAccountSku property: SKU of the ACR account. + * + * @param acrAccountSku the acrAccountSku value to set. + * @return the SystemCreatedAcrAccount object itself. + */ + public SystemCreatedAcrAccount withAcrAccountSku(String acrAccountSku) { + this.acrAccountSku = acrAccountSku; + return this; + } + + /** + * Get the armResourceId property: This is populated once the ACR account is created. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: This is populated once the ACR account is created. + * + * @param armResourceId the armResourceId value to set. + * @return the SystemCreatedAcrAccount object itself. + */ + public SystemCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java new file mode 100644 index 0000000000000..9cb13029e84f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SystemCreatedStorageAccount model. */ +@Fluent +public final class SystemCreatedStorageAccount { + /* + * Public blob access allowed + */ + @JsonProperty(value = "allowBlobPublicAccess") + private Boolean allowBlobPublicAccess; + + /* + * This is populated once the storage account is created. + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /* + * HNS enabled for storage account + */ + @JsonProperty(value = "storageAccountHnsEnabled") + private Boolean storageAccountHnsEnabled; + + /* + * Name of the storage account + */ + @JsonProperty(value = "storageAccountName") + private String storageAccountName; + + /* + * Allowed values: + * "Standard_LRS", + * "Standard_GRS", + * "Standard_RAGRS", + * "Standard_ZRS", + * "Standard_GZRS", + * "Standard_RAGZRS", + * "Premium_LRS", + * "Premium_ZRS" + */ + @JsonProperty(value = "storageAccountType") + private String storageAccountType; + + /** Creates an instance of SystemCreatedStorageAccount class. */ + public SystemCreatedStorageAccount() { + } + + /** + * Get the allowBlobPublicAccess property: Public blob access allowed. + * + * @return the allowBlobPublicAccess value. + */ + public Boolean allowBlobPublicAccess() { + return this.allowBlobPublicAccess; + } + + /** + * Set the allowBlobPublicAccess property: Public blob access allowed. + * + * @param allowBlobPublicAccess the allowBlobPublicAccess value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withAllowBlobPublicAccess(Boolean allowBlobPublicAccess) { + this.allowBlobPublicAccess = allowBlobPublicAccess; + return this; + } + + /** + * Get the armResourceId property: This is populated once the storage account is created. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: This is populated once the storage account is created. + * + * @param armResourceId the armResourceId value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Get the storageAccountHnsEnabled property: HNS enabled for storage account. + * + * @return the storageAccountHnsEnabled value. + */ + public Boolean storageAccountHnsEnabled() { + return this.storageAccountHnsEnabled; + } + + /** + * Set the storageAccountHnsEnabled property: HNS enabled for storage account. + * + * @param storageAccountHnsEnabled the storageAccountHnsEnabled value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withStorageAccountHnsEnabled(Boolean storageAccountHnsEnabled) { + this.storageAccountHnsEnabled = storageAccountHnsEnabled; + return this; + } + + /** + * Get the storageAccountName property: Name of the storage account. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Set the storageAccountName property: Name of the storage account. + * + * @param storageAccountName the storageAccountName value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withStorageAccountName(String storageAccountName) { + this.storageAccountName = storageAccountName; + return this; + } + + /** + * Get the storageAccountType property: Allowed values: "Standard_LRS", "Standard_GRS", "Standard_RAGRS", + * "Standard_ZRS", "Standard_GZRS", "Standard_RAGZRS", "Premium_LRS", "Premium_ZRS". + * + * @return the storageAccountType value. + */ + public String storageAccountType() { + return this.storageAccountType; + } + + /** + * Set the storageAccountType property: Allowed values: "Standard_LRS", "Standard_GRS", "Standard_RAGRS", + * "Standard_ZRS", "Standard_GZRS", "Standard_RAGZRS", "Premium_LRS", "Premium_ZRS". + * + * @param storageAccountType the storageAccountType value to set. + * @return the SystemCreatedStorageAccount object itself. + */ + public SystemCreatedStorageAccount withStorageAccountType(String storageAccountType) { + this.storageAccountType = storageAccountType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java new file mode 100644 index 0000000000000..d1239f380fa3c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the tmpfs options for the container. */ +@Fluent +public final class TmpfsOptions { + /* + * Mention the Tmpfs size + */ + @JsonProperty(value = "size") + private Integer size; + + /** Creates an instance of TmpfsOptions class. */ + public TmpfsOptions() { + } + + /** + * Get the size property: Mention the Tmpfs size. + * + * @return the size value. + */ + public Integer size() { + return this.size; + } + + /** + * Set the size property: Mention the Tmpfs size. + * + * @param size the size value to set. + * @return the TmpfsOptions object itself. + */ + public TmpfsOptions withSize(Integer size) { + this.size = size; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java new file mode 100644 index 0000000000000..7a0770a16c5b2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The TopNFeaturesByAttribution model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "filterType") +@JsonTypeName("TopNByAttribution") +@Fluent +public final class TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { + /* + * The number of top features to include. + */ + @JsonProperty(value = "top") + private Integer top; + + /** Creates an instance of TopNFeaturesByAttribution class. */ + public TopNFeaturesByAttribution() { + } + + /** + * Get the top property: The number of top features to include. + * + * @return the top value. + */ + public Integer top() { + return this.top; + } + + /** + * Set the top property: The number of top features to include. + * + * @param top the top value to set. + * @return the TopNFeaturesByAttribution object itself. + */ + public TopNFeaturesByAttribution withTop(Integer top) { + this.top = top; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java index efc6c81be31d6..e90b5cd6cf969 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java @@ -10,7 +10,7 @@ /** User assigned identity properties. */ @Immutable -public class UserAssignedIdentity { +public final class UserAssignedIdentity { /* * The principal ID of the assigned identity. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java new file mode 100644 index 0000000000000..7cabd36e60439 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The UserCreatedAcrAccount model. */ +@Fluent +public final class UserCreatedAcrAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** Creates an instance of UserCreatedAcrAccount class. */ + public UserCreatedAcrAccount() { + } + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedAcrAccount object itself. + */ + public UserCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java new file mode 100644 index 0000000000000..f23f2f94f4780 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The UserCreatedStorageAccount model. */ +@Fluent +public final class UserCreatedStorageAccount { + /* + * ARM ResourceId of a resource + */ + @JsonProperty(value = "armResourceId") + private ArmResourceId armResourceId; + + /** Creates an instance of UserCreatedStorageAccount class. */ + public UserCreatedStorageAccount() { + } + + /** + * Get the armResourceId property: ARM ResourceId of a resource. + * + * @return the armResourceId value. + */ + public ArmResourceId armResourceId() { + return this.armResourceId; + } + + /** + * Set the armResourceId property: ARM ResourceId of a resource. + * + * @param armResourceId the armResourceId value to set. + * @return the UserCreatedStorageAccount object itself. + */ + public UserCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { + this.armResourceId = armResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (armResourceId() != null) { + armResourceId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java index bd76cf17193eb..f18505b812c3b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java @@ -12,7 +12,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") @JsonTypeName("UserIdentity") @Immutable -public class UserIdentity extends IdentityConfiguration { +public final class UserIdentity extends IdentityConfiguration { /** Creates an instance of UserIdentity class. */ public UserIdentity() { } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java new file mode 100644 index 0000000000000..8a4ae04638a68 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the volume configuration for the container. */ +@Fluent +public final class VolumeDefinition { + /* + * Type of Volume Definition + * + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + */ + @JsonProperty(value = "type") + private VolumeDefinitionType type; + + /* + * Indicate whether to mount volume as readOnly. Default value for this is false. + */ + @JsonProperty(value = "readOnly") + private Boolean readOnly; + + /* + * Source of the mount. For bind mounts this is the host path. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Target of the mount. For bind mounts this is the path in the container. + */ + @JsonProperty(value = "target") + private String target; + + /* + * Consistency of the volume + */ + @JsonProperty(value = "consistency") + private String consistency; + + /* + * Bind Options of the mount + */ + @JsonProperty(value = "bind") + private BindOptions bind; + + /* + * Volume Options of the mount + */ + @JsonProperty(value = "volume") + private VolumeOptions volume; + + /* + * tmpfs option of the mount + */ + @JsonProperty(value = "tmpfs") + private TmpfsOptions tmpfs; + + /** Creates an instance of VolumeDefinition class. */ + public VolumeDefinition() { + } + + /** + * Get the type property: Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * + * @return the type value. + */ + public VolumeDefinitionType type() { + return this.type; + } + + /** + * Set the type property: Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * + * @param type the type value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withType(VolumeDefinitionType type) { + this.type = type; + return this; + } + + /** + * Get the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. + * + * @return the readOnly value. + */ + public Boolean readOnly() { + return this.readOnly; + } + + /** + * Set the readOnly property: Indicate whether to mount volume as readOnly. Default value for this is false. + * + * @param readOnly the readOnly value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Get the source property: Source of the mount. For bind mounts this is the host path. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Source of the mount. For bind mounts this is the host path. + * + * @param source the source value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the target property: Target of the mount. For bind mounts this is the path in the container. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: Target of the mount. For bind mounts this is the path in the container. + * + * @param target the target value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the consistency property: Consistency of the volume. + * + * @return the consistency value. + */ + public String consistency() { + return this.consistency; + } + + /** + * Set the consistency property: Consistency of the volume. + * + * @param consistency the consistency value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withConsistency(String consistency) { + this.consistency = consistency; + return this; + } + + /** + * Get the bind property: Bind Options of the mount. + * + * @return the bind value. + */ + public BindOptions bind() { + return this.bind; + } + + /** + * Set the bind property: Bind Options of the mount. + * + * @param bind the bind value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withBind(BindOptions bind) { + this.bind = bind; + return this; + } + + /** + * Get the volume property: Volume Options of the mount. + * + * @return the volume value. + */ + public VolumeOptions volume() { + return this.volume; + } + + /** + * Set the volume property: Volume Options of the mount. + * + * @param volume the volume value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withVolume(VolumeOptions volume) { + this.volume = volume; + return this; + } + + /** + * Get the tmpfs property: tmpfs option of the mount. + * + * @return the tmpfs value. + */ + public TmpfsOptions tmpfs() { + return this.tmpfs; + } + + /** + * Set the tmpfs property: tmpfs option of the mount. + * + * @param tmpfs the tmpfs value to set. + * @return the VolumeDefinition object itself. + */ + public VolumeDefinition withTmpfs(TmpfsOptions tmpfs) { + this.tmpfs = tmpfs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bind() != null) { + bind().validate(); + } + if (volume() != null) { + volume().validate(); + } + if (tmpfs() != null) { + tmpfs().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java new file mode 100644 index 0000000000000..4b4a3ede0f642 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.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.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of Volume Definition + * + *

Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + */ +public final class VolumeDefinitionType extends ExpandableStringEnum { + /** Static value bind for VolumeDefinitionType. */ + public static final VolumeDefinitionType BIND = fromString("bind"); + + /** Static value volume for VolumeDefinitionType. */ + public static final VolumeDefinitionType VOLUME = fromString("volume"); + + /** Static value tmpfs for VolumeDefinitionType. */ + public static final VolumeDefinitionType TMPFS = fromString("tmpfs"); + + /** Static value npipe for VolumeDefinitionType. */ + public static final VolumeDefinitionType NPIPE = fromString("npipe"); + + /** + * Creates a new instance of VolumeDefinitionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeDefinitionType() { + } + + /** + * Creates or finds a VolumeDefinitionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeDefinitionType. + */ + @JsonCreator + public static VolumeDefinitionType fromString(String name) { + return fromString(name, VolumeDefinitionType.class); + } + + /** + * Gets known VolumeDefinitionType values. + * + * @return known VolumeDefinitionType values. + */ + public static Collection values() { + return values(VolumeDefinitionType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java new file mode 100644 index 0000000000000..0cdf63d381e91 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the volume options for the container. */ +@Fluent +public final class VolumeOptions { + /* + * Indicate whether volume is nocopy + */ + @JsonProperty(value = "nocopy") + private Boolean nocopy; + + /** Creates an instance of VolumeOptions class. */ + public VolumeOptions() { + } + + /** + * Get the nocopy property: Indicate whether volume is nocopy. + * + * @return the nocopy value. + */ + public Boolean nocopy() { + return this.nocopy; + } + + /** + * Set the nocopy property: Indicate whether volume is nocopy. + * + * @param nocopy the nocopy value to set. + * @return the VolumeOptions object itself. + */ + public VolumeOptions withNocopy(Boolean nocopy) { + this.nocopy = nocopy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java new file mode 100644 index 0000000000000..8de268e82fd5f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.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.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Webhook base. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "webhookType", + defaultImpl = Webhook.class) +@JsonTypeName("Webhook") +@JsonSubTypes({@JsonSubTypes.Type(name = "AzureDevOps", value = AzureDevOpsWebhook.class)}) +@Fluent +public class Webhook { + /* + * Send callback on a specified notification event + */ + @JsonProperty(value = "eventType") + private String eventType; + + /** Creates an instance of Webhook class. */ + public Webhook() { + } + + /** + * Get the eventType property: Send callback on a specified notification event. + * + * @return the eventType value. + */ + public String eventType() { + return this.eventType; + } + + /** + * Set the eventType property: Send callback on a specified notification event. + * + * @param eventType the eventType value to set. + * @return the Webhook object itself. + */ + public Webhook withEventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java new file mode 100644 index 0000000000000..1e4a0081dd486 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum to determine the webhook callback service type. */ +public final class WebhookType extends ExpandableStringEnum { + /** Static value AzureDevOps for WebhookType. */ + public static final WebhookType AZURE_DEV_OPS = fromString("AzureDevOps"); + + /** + * Creates a new instance of WebhookType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WebhookType() { + } + + /** + * Creates or finds a WebhookType from its string representation. + * + * @param name a name to look for. + * @return the corresponding WebhookType. + */ + @JsonCreator + public static WebhookType fromString(String name) { + return fromString(name, WebhookType.class); + } + + /** + * Gets known WebhookType values. + * + * @return known WebhookType values. + */ + public static Collection values() { + return values(WebhookType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java index 42e253da0269e..41dc8669949fe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java @@ -8,6 +8,7 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; import java.util.List; import java.util.Map; @@ -196,6 +197,13 @@ public interface Workspace { */ List privateEndpointConnections(); + /** + * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + ServerlessComputeSettings serverlessComputeSettings(); + /** * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * @@ -256,6 +264,13 @@ public interface Workspace { */ Boolean v1LegacyMode(); + /** + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + ManagedNetworkSettings managedNetwork(); + /** * Gets the region of the resource. * @@ -288,11 +303,13 @@ public interface Workspace { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The Workspace definition stages. */ interface DefinitionStages { /** The first stage of the Workspace definition. */ interface Blank extends WithResourceGroup { } + /** The stage of the Workspace definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -303,6 +320,7 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the Workspace 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. @@ -324,10 +342,12 @@ interface WithCreate DefinitionStages.WithImageBuildCompute, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithServerlessComputeSettings, DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, DefinitionStages.WithPrimaryUserAssignedIdentity, - DefinitionStages.WithV1LegacyMode { + DefinitionStages.WithV1LegacyMode, + DefinitionStages.WithManagedNetwork { /** * Executes the create request. * @@ -343,6 +363,7 @@ interface WithCreate */ Workspace create(Context context); } + /** The stage of the Workspace definition allowing to specify location. */ interface WithLocation { /** @@ -361,6 +382,7 @@ interface WithLocation { */ WithCreate withRegion(String location); } + /** The stage of the Workspace definition allowing to specify tags. */ interface WithTags { /** @@ -371,6 +393,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Workspace definition allowing to specify identity. */ interface WithIdentity { /** @@ -381,6 +404,7 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the Workspace definition allowing to specify sku. */ interface WithSku { /** @@ -391,6 +415,7 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the Workspace definition allowing to specify description. */ interface WithDescription { /** @@ -401,6 +426,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Workspace definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -411,6 +437,7 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + /** The stage of the Workspace definition allowing to specify keyVault. */ interface WithKeyVault { /** @@ -423,6 +450,7 @@ interface WithKeyVault { */ WithCreate withKeyVault(String keyVault); } + /** The stage of the Workspace definition allowing to specify applicationInsights. */ interface WithApplicationInsights { /** @@ -434,6 +462,7 @@ interface WithApplicationInsights { */ WithCreate withApplicationInsights(String applicationInsights); } + /** The stage of the Workspace definition allowing to specify containerRegistry. */ interface WithContainerRegistry { /** @@ -445,6 +474,7 @@ interface WithContainerRegistry { */ WithCreate withContainerRegistry(String containerRegistry); } + /** The stage of the Workspace definition allowing to specify storageAccount. */ interface WithStorageAccount { /** @@ -457,6 +487,7 @@ interface WithStorageAccount { */ WithCreate withStorageAccount(String storageAccount); } + /** The stage of the Workspace definition allowing to specify discoveryUrl. */ interface WithDiscoveryUrl { /** @@ -469,6 +500,7 @@ interface WithDiscoveryUrl { */ WithCreate withDiscoveryUrl(String discoveryUrl); } + /** The stage of the Workspace definition allowing to specify encryption. */ interface WithEncryption { /** @@ -479,6 +511,7 @@ interface WithEncryption { */ WithCreate withEncryption(EncryptionProperty encryption); } + /** The stage of the Workspace definition allowing to specify hbiWorkspace. */ interface WithHbiWorkspace { /** @@ -491,6 +524,7 @@ interface WithHbiWorkspace { */ WithCreate withHbiWorkspace(Boolean hbiWorkspace); } + /** The stage of the Workspace definition allowing to specify imageBuildCompute. */ interface WithImageBuildCompute { /** @@ -501,6 +535,7 @@ interface WithImageBuildCompute { */ WithCreate withImageBuildCompute(String imageBuildCompute); } + /** The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. */ interface WithAllowPublicAccessWhenBehindVnet { /** @@ -513,6 +548,7 @@ interface WithAllowPublicAccessWhenBehindVnet { */ WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); } + /** The stage of the Workspace definition allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** @@ -523,6 +559,19 @@ interface WithPublicNetworkAccess { */ WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); } + + /** The stage of the Workspace definition allowing to specify serverlessComputeSettings. */ + interface WithServerlessComputeSettings { + /** + * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the + * workspace. + * + * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @return the next definition stage. + */ + WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + } + /** The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. */ interface WithSharedPrivateLinkResources { /** @@ -534,6 +583,7 @@ interface WithSharedPrivateLinkResources { */ WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); } + /** The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. */ interface WithServiceManagedResourcesSettings { /** @@ -545,6 +595,7 @@ interface WithServiceManagedResourcesSettings { WithCreate withServiceManagedResourcesSettings( ServiceManagedResourcesSettings serviceManagedResourcesSettings); } + /** The stage of the Workspace definition allowing to specify primaryUserAssignedIdentity. */ interface WithPrimaryUserAssignedIdentity { /** @@ -557,6 +608,7 @@ interface WithPrimaryUserAssignedIdentity { */ WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } + /** The stage of the Workspace definition allowing to specify v1LegacyMode. */ interface WithV1LegacyMode { /** @@ -568,7 +620,19 @@ interface WithV1LegacyMode { */ WithCreate withV1LegacyMode(Boolean v1LegacyMode); } + + /** The stage of the Workspace definition allowing to specify managedNetwork. */ + interface WithManagedNetwork { + /** + * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. + * + * @param managedNetwork Managed Network settings for a machine learning workspace. + * @return the next definition stage. + */ + WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); + } } + /** * Begins update for the Workspace resource. * @@ -586,6 +650,7 @@ interface Update UpdateStages.WithImageBuildCompute, UpdateStages.WithServiceManagedResourcesSettings, UpdateStages.WithPrimaryUserAssignedIdentity, + UpdateStages.WithServerlessComputeSettings, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithApplicationInsights, UpdateStages.WithContainerRegistry { @@ -604,6 +669,7 @@ interface Update */ Workspace apply(Context context); } + /** The Workspace update stages. */ interface UpdateStages { /** The stage of the Workspace update allowing to specify tags. */ @@ -616,6 +682,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Workspace update allowing to specify sku. */ interface WithSku { /** @@ -626,6 +693,7 @@ interface WithSku { */ Update withSku(Sku sku); } + /** The stage of the Workspace update allowing to specify identity. */ interface WithIdentity { /** @@ -636,6 +704,7 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the Workspace update allowing to specify description. */ interface WithDescription { /** @@ -646,6 +715,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Workspace update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -656,6 +726,7 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + /** The stage of the Workspace update allowing to specify imageBuildCompute. */ interface WithImageBuildCompute { /** @@ -666,6 +737,7 @@ interface WithImageBuildCompute { */ Update withImageBuildCompute(String imageBuildCompute); } + /** The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. */ interface WithServiceManagedResourcesSettings { /** @@ -676,6 +748,7 @@ interface WithServiceManagedResourcesSettings { */ Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); } + /** The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. */ interface WithPrimaryUserAssignedIdentity { /** @@ -688,6 +761,19 @@ interface WithPrimaryUserAssignedIdentity { */ Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } + + /** The stage of the Workspace update allowing to specify serverlessComputeSettings. */ + interface WithServerlessComputeSettings { + /** + * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the + * workspace. + * + * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @return the next definition stage. + */ + Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + } + /** The stage of the Workspace update allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** @@ -698,6 +784,7 @@ interface WithPublicNetworkAccess { */ Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); } + /** The stage of the Workspace update allowing to specify applicationInsights. */ interface WithApplicationInsights { /** @@ -709,6 +796,7 @@ interface WithApplicationInsights { */ Update withApplicationInsights(String applicationInsights); } + /** The stage of the Workspace update allowing to specify containerRegistry. */ interface WithContainerRegistry { /** @@ -721,6 +809,7 @@ interface WithContainerRegistry { Update withContainerRegistry(String containerRegistry); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java index 8f7d813b83b87..d712555af9fc9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java @@ -9,7 +9,7 @@ /** The WorkspaceConnectionManagedIdentity model. */ @Fluent -public class WorkspaceConnectionManagedIdentity { +public final class WorkspaceConnectionManagedIdentity { /* * The resourceId property. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java index 22ef3cb48926e..d773ad43f5ba7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java @@ -60,11 +60,13 @@ interface Definition DefinitionStages.WithProperties, DefinitionStages.WithCreate { } + /** The WorkspaceConnectionPropertiesV2BasicResource definition stages. */ interface DefinitionStages { /** The first stage of the WorkspaceConnectionPropertiesV2BasicResource definition. */ interface Blank extends WithParentResource { } + /** * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify parent resource. */ @@ -78,6 +80,7 @@ interface WithParentResource { */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } + /** The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify properties. */ interface WithProperties { /** @@ -88,6 +91,7 @@ interface WithProperties { */ WithCreate withProperties(WorkspaceConnectionPropertiesV2 properties); } + /** * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition which contains all the minimum * required properties for the resource to be created, but also allows for any other optional properties to be @@ -110,6 +114,7 @@ interface WithCreate { WorkspaceConnectionPropertiesV2BasicResource create(Context context); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java index 41e6d8c3f5a00..f061565b74c0b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java @@ -135,6 +135,13 @@ public interface WorkspaceProperties { */ List privateEndpointConnections(); + /** + * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + ServerlessComputeSettings serverlessComputeSettings(); + /** * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * @@ -195,6 +202,13 @@ public interface WorkspaceProperties { */ Boolean v1LegacyMode(); + /** + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + ManagedNetworkSettings managedNetwork(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java index 7d7ada04b8eed..d6028da2d5ee4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java @@ -229,6 +229,30 @@ public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryU return this; } + /** + * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters withServerlessComputeSettings( + ServerlessComputeSettings serverlessComputeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParameters(); + } + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + /** * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java index 3d21925cc55f9..ae5c6617e0b66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java @@ -44,19 +44,20 @@ public interface Workspaces { * @throws com.azure.core.management.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 workspaceName); + void delete(String resourceGroupName, String workspaceName); /** * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String workspaceName, Context context); + void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); /** * Lists all the available machine learning workspaces under the specified resource group. @@ -353,12 +354,13 @@ Response listOutboundNetworkDependenciesEndpointsWithRespo * Deletes a machine learning workspace. * * @param id the resource ID. + * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Boolean forceToPurge, Context context); /** * Begins definition for a new Workspace resource. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java index 2577043eada6c..d0923a3048a1a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure + * Package containing the data models for AzureMachineLearningServices. These APIs allow end users to operate on Azure * Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java index a318a1e7d76bb..93e6c12b06e6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure + * Package containing the classes for AzureMachineLearningServices. These APIs allow end users to operate on Azure * Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java index fb21453d26444..8246a528330ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java @@ -26,14 +26,14 @@ /** Samples for BatchDeployments CreateOrUpdate. */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Deployment. + * Sample code: CreateOrUpdate Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchDeployment( + public static void createOrUpdateWorkspaceBatchDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .batchDeployments() @@ -86,6 +86,7 @@ public static void createOrUpdateBatchDeployment( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java index 7b39c6096d2c9..099c2ef1f1976 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchDeployments Delete. */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/delete.json */ /** - * Sample code: Delete Batch Deployment. + * Sample code: Delete Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .delete( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java index c1b47f7e527f9..1e0b98869c9b6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchDeployments Get. */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/get.json */ /** - * Sample code: Get Batch Deployment. + * Sample code: Get Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .getWithResponse( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java index b5fff0eb963bb..07548269c863f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchDeployments List. */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/list.json */ /** - * Sample code: List Batch Deployment. + * Sample code: List Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchDeployments() .list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java index 847ffdcac6c71..ff80ae8271e69 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java @@ -12,14 +12,15 @@ /** Samples for BatchDeployments Update. */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchDeployment/update.json */ /** - * Sample code: Update Batch Deployment. + * Sample code: Update Workspace Batch Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void updateWorkspaceBatchDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { BatchDeployment resource = manager .batchDeployments() @@ -37,6 +38,7 @@ public static void updateBatchDeployment(com.azure.resourcemanager.machinelearni .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java index 456f30a703bec..9686af22b80c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java @@ -18,14 +18,14 @@ /** Samples for BatchEndpoints CreateOrUpdate. */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Batch Endpoint. + * Sample code: CreateOrUpdate Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateBatchEndpoint( + public static void createOrUpdateWorkspaceBatchEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() @@ -54,6 +54,7 @@ public static void createOrUpdateBatchEndpoint( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java index 6456c727fcc49..27a2c2a6f9341 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchEndpoints Delete. */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/delete.json */ /** - * Sample code: Delete Batch Endpoint. + * Sample code: Delete Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java index 9daf7b13cfeef..b0c35ca609537 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchEndpoints Get. */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/get.json */ /** - * Sample code: Get Batch Endpoint. + * Sample code: Get Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java index 5d0685fd73105..4e4bdc439c943 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchEndpoints ListKeys. */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/listKeys.json */ /** - * Sample code: ListKeys Batch Endpoint. + * Sample code: ListKeys Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listKeysWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .batchEndpoints() .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java index 6ab315093f3db..30f03c9f4eb42 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java @@ -7,14 +7,15 @@ /** Samples for BatchEndpoints List. */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/list.json */ /** - * Sample code: List Batch Endpoint. + * Sample code: List Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java index 4a7fd23152fe1..9d42189f19194 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java @@ -16,15 +16,15 @@ /** Samples for BatchEndpoints Update. */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/BatchEndpoint/update.json */ /** - * Sample code: Update Batch Endpoint. + * Sample code: Update Workspace Batch Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { + public static void updateWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { BatchEndpoint resource = manager .batchEndpoints() @@ -45,6 +45,7 @@ public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java index 99ad6bdb20be5..eb0c9724eedd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import java.util.HashMap; import java.util.Map; @@ -11,26 +12,30 @@ /** Samples for CodeContainers CreateOrUpdate. */ public final class CodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Container. + * Sample code: CreateOrUpdate Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeContainer( + public static void createOrUpdateWorkspaceCodeContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new CodeContainerProperties() - .withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testContainer", + new CodeContainerInner() + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java index f1db0a949fa49..e368a14871d6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for CodeContainers Delete. */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/delete.json */ /** - * Sample code: Delete Code Container. + * Sample code: Delete Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java index 8bc80b6fe906a..488cc90dac184 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java @@ -7,14 +7,15 @@ /** Samples for CodeContainers Get. */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/get.json */ /** - * Sample code: Get Code Container. + * Sample code: Get Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeContainers() .getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java index fd3cd97cad525..13812e7e43e4d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java @@ -7,14 +7,15 @@ /** Samples for CodeContainers List. */ public final class CodeContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeContainer/list.json */ /** - * Sample code: List Code Container. + * Sample code: List Workspace Code Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeContainers().list("testrg123", "testworkspace", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java new file mode 100644 index 0000000000000..98f5e97518e53 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for CodeVersions CreateOrGetStartPendingUpload. */ +public final class CodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .codeVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.NONE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java index 92534796defae..053b7648c5821 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import java.util.HashMap; import java.util.Map; @@ -11,29 +12,34 @@ /** Samples for CodeVersions CreateOrUpdate. */ public final class CodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Code Version. + * Sample code: CreateOrUpdate Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateCodeVersion( + public static void createOrUpdateWorkspaceCodeVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties( - new CodeVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("fakeTokenPlaceholder")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new CodeVersionInner() + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java index d933ba22b21ac..86328f91264d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for CodeVersions Delete. */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/delete.json */ /** - * Sample code: Delete Code Version. + * Sample code: Delete Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java index 61640e5ec45f2..918dec1ec0c4d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for CodeVersions Get. */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/get.json */ /** - * Sample code: Get Code Version. + * Sample code: Get Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java index 779bbf653004e..3dd3bd29fc112 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java @@ -7,16 +7,26 @@ /** Samples for CodeVersions List. */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/list.json */ /** - * Sample code: List Code Version. + * Sample code: List Workspace Code Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .codeVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); + .list( + "test-rg", + "my-aml-workspace", + "string", + "string", + 1, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java new file mode 100644 index 0000000000000..dfc5a4a83e174 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for CodeVersions Publish. */ +public final class CodeVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/CodeVersion/publish.json + */ + /** + * Sample code: Publish Workspace Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .codeVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java index cef6af5f93a33..e5fac5d6238b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import java.util.HashMap; import java.util.Map; @@ -11,27 +12,31 @@ /** Samples for ComponentContainers CreateOrUpdate. */ public final class ComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Container. + * Sample code: CreateOrUpdate Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentContainer( + public static void createOrUpdateWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ComponentContainerProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string"))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + new ComponentContainerInner() + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java index c6b1f50305847..f27f49a998782 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java @@ -7,14 +7,14 @@ /** Samples for ComponentContainers Delete. */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/delete.json */ /** - * Sample code: Delete Component Container. + * Sample code: Delete Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentContainer( + public static void deleteWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java index a3370c8ca451a..241dd702d9875 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java @@ -7,14 +7,15 @@ /** Samples for ComponentContainers Get. */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/get.json */ /** - * Sample code: Get Component Container. + * Sample code: Get Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentContainers() .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java index bd2af0671ad33..9448f8ef61357 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java @@ -7,14 +7,14 @@ /** Samples for ComponentContainers List. */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentContainer/list.json */ /** - * Sample code: List Component Container. + * Sample code: List Workspace Component Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentContainer( + public static void listWorkspaceComponentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java index dfb4e061dd7d0..3ca7ee3463f5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java @@ -6,6 +6,7 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import java.io.IOException; import java.util.HashMap; @@ -14,35 +15,40 @@ /** Samples for ComponentVersions CreateOrUpdate. */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Component Version. + * Sample code: CreateOrUpdate Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateComponentVersion( + public static void createOrUpdateWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { manager .componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties( - new ComponentVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", - Object.class, - SerializerEncoding.JSON))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ComponentVersionInner() + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java index d20b0d247f326..77d7f8b9e17d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java @@ -7,14 +7,14 @@ /** Samples for ComponentVersions Delete. */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/delete.json */ /** - * Sample code: Delete Component Version. + * Sample code: Delete Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteComponentVersion( + public static void deleteWorkspaceComponentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java index fde41af2e3051..64fbede9f7131 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for ComponentVersions Get. */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/get.json */ /** - * Sample code: Get Component Version. + * Sample code: Get Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java index 19a8b1a2ac811..626e3f2c1bd5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java @@ -7,14 +7,15 @@ /** Samples for ComponentVersions List. */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/list.json */ /** - * Sample code: List Component Version. + * Sample code: List Workspace Component Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .componentVersions() .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java new file mode 100644 index 0000000000000..4dc30b5c5a842 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for ComponentVersions Publish. */ +public final class ComponentVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ComponentVersion/publish.json + */ + /** + * Sample code: Publish Workspace Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .componentVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java index 943186937135e..378438a9c7931 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java @@ -14,27 +14,44 @@ import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings; +import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; +import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; +import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; +import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; +import com.azure.resourcemanager.machinelearning.models.Cron; +import com.azure.resourcemanager.machinelearning.models.CustomService; import com.azure.resourcemanager.machinelearning.models.DataFactory; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; +import com.azure.resourcemanager.machinelearning.models.Protocol; import com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess; import com.azure.resourcemanager.machinelearning.models.ResourceId; import com.azure.resourcemanager.machinelearning.models.ScaleSettings; +import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; import com.azure.resourcemanager.machinelearning.models.VmPriority; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Compute CreateOrUpdate. */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -52,7 +69,7 @@ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning. } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -75,7 +92,7 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -112,7 +129,7 @@ public static void attachAKubernetesCompute( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -140,12 +157,26 @@ public static void createAnComputeInstanceComputeWithSchedules( .withAssignedUser( new AssignedUser() .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) + .withTenantId("00000000-0000-0000-0000-000000000000"))) + .withSchedules( + new ComputeSchedules() + .withComputeStartStop( + Arrays + .asList( + new ComputeStartStopSchedule() + .withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.CRON) + .withCron( + new Cron() + .withStartTime("2021-04-23T01:30:00") + .withTimeZone("Pacific Standard Time") + .withExpression("0 18 * * *"))))))) .create(); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -181,7 +212,7 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -204,6 +235,42 @@ public static void createAnComputeInstanceCompute( .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) .withSshSettings( new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withCustomServices( + Arrays + .asList( + new CustomService() + .withName("rstudio") + .withImage( + new Image() + .withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables( + mapOf( + "test_variable", + new EnvironmentVariable() + .withType(EnvironmentVariableType.LOCAL) + .withValue("test_value") + .withAdditionalProperties(mapOf()))) + .withDocker( + new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints( + Arrays + .asList( + new Endpoint() + .withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(8787))) + .withVolumes( + Arrays + .asList( + new VolumeDefinition() + .withType(VolumeDefinitionType.BIND) + .withReadOnly(false) + .withSource("/home/azureuser/cloudfiles") + .withTarget("/home/azureuser/cloudfiles"))) + .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) .withPersonalComputeInstanceSettings( new PersonalComputeInstanceSettings() @@ -215,7 +282,7 @@ public static void createAnComputeInstanceCompute( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -235,7 +302,7 @@ public static void createAnComputeInstanceComputeWithMinimalInputs( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -262,7 +329,7 @@ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -280,6 +347,7 @@ public static void createADataFactoryCompute( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java index ee6c38e168ead..57b6721d24cfa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Compute Delete. */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/delete.json */ /** * Sample code: Delete Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java index eeb1c6dfefd94..e3c05a9b266ad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute Get. */ public final class ComputeGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -21,7 +21,7 @@ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.Mach } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -35,7 +35,7 @@ public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearni } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -49,7 +49,7 @@ public static void getAnComputeInstance(com.azure.resourcemanager.machinelearnin } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java index 2591bf4e8cf7d..3f48474b2d147 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute ListKeys. */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java index 6a76b986c2c8c..d4ef505b72c18 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute ListNodes. */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java index 76569fd48bfb8..92d569a1b6d9b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute List. */ public final class ComputeListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/list.json */ /** * Sample code: Get Computes. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java index f4e3d4904b1ce..1cf6ad58bfdc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute Restart. */ public final class ComputeRestartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java index a27b9dd8f911d..62076f03ef149 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute Start. */ public final class ComputeStartSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java index 9b9d0be34a8cc..5f263c36edd7a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java @@ -7,7 +7,7 @@ /** Samples for Compute Stop. */ public final class ComputeStopSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java index 6ae1b51588f65..3f310106df4b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Compute Update. */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java index 470d585fbac73..3ac6fe30c3a49 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; @@ -12,28 +13,32 @@ /** Samples for DataContainers CreateOrUpdate. */ public final class DataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Container. + * Sample code: CreateOrUpdate Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataContainer( + public static void createOrUpdateWorkspaceDataContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new DataContainerProperties() - .withDescription("string") - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "datacontainer123", + new DataContainerInner() + .withProperties( + new DataContainerProperties() + .withDescription("string") + .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDataType(DataType.fromString("UriFile"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java index 43273b2c9c5bf..24027538f77b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for DataContainers Delete. */ public final class DataContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/delete.json */ /** - * Sample code: Delete Data Container. + * Sample code: Delete Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java index 43692b7b234fe..2fed845613b05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java @@ -7,14 +7,15 @@ /** Samples for DataContainers Get. */ public final class DataContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/get.json */ /** - * Sample code: Get Data Container. + * Sample code: Get Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataContainers() .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java index 497053036fa39..6c137c5f3feb2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java @@ -7,14 +7,15 @@ /** Samples for DataContainers List. */ public final class DataContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataContainer/list.json */ /** - * Sample code: List Data Container. + * Sample code: List Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java index d90fcdc2db269..49e128535e8fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; import java.util.HashMap; import java.util.Map; @@ -11,29 +12,34 @@ /** Samples for DataVersions CreateOrUpdate. */ public final class DataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Data Version Base. + * Sample code: CreateOrUpdate Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDataVersionBase( + public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties( - new UriFileDataVersion() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("string")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DataVersionBaseInner() + .withProperties( + new UriFileDataVersion() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withDataUri("string")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java index 79c9624287da9..e2f324e7f5d35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for DataVersions Delete. */ public final class DataVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/delete.json */ /** - * Sample code: Delete Data Version Base. + * Sample code: Delete Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java index c0ed4ee30644a..7b369b755ae23 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for DataVersions Get. */ public final class DataVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/get.json */ /** - * Sample code: Get Data Version Base. + * Sample code: Get Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void getDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java index 62ce47598970b..34bf7ab262878 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java @@ -7,14 +7,15 @@ /** Samples for DataVersions List. */ public final class DataVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/list.json */ /** - * Sample code: List Data Version Base. + * Sample code: List Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .dataVersions() .list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java new file mode 100644 index 0000000000000..7fafb9741c00a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for DataVersions Publish. */ +public final class DataVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/DataVersionBase/publish.json + */ + /** + * Sample code: Publish Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .dataVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java index 1ec4a1f1c4ea6..bb549b54173d6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ /** Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -50,7 +50,7 @@ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -84,7 +84,7 @@ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -113,7 +113,7 @@ public static void createOrUpdateDatastoreAzureBlobWAccountKey( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -141,6 +141,7 @@ public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java index 74ee3e5e79053..0384f87d53912 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Datastores Delete. */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java index 8bd81700eff59..29b4682b82a86 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Datastores Get. */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/get.json */ /** * Sample code: Get datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java index 6f768bffac33c..88cc2b9bda12d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java @@ -9,7 +9,7 @@ /** Samples for Datastores List. */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/list.json */ /** * Sample code: List datastores. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java index 4e9a8c6857a50..2b34e55a817f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java @@ -7,7 +7,7 @@ /** Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java index 09f24071f65e9..c3dbf3740b2a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; @@ -11,29 +12,45 @@ /** Samples for EnvironmentContainers CreateOrUpdate. */ public final class EnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Container. + * Sample code: CreateOrUpdate Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentContainer( + public static void createOrUpdateWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerProperties() - .withDescription("string") + .createOrUpdateWithResponse( + "testrg123", + "testworkspace", + "testEnvironment", + new EnvironmentContainerInner() .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string")) + .withTags( + mapOf( + "additionalProp1", + "string", + "additionalProp2", + "string", + "additionalProp3", + "string"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java index 62f26c6e966f3..e2e8c949d4e91 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java @@ -7,14 +7,14 @@ /** Samples for EnvironmentContainers Delete. */ public final class EnvironmentContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Environment Container. + * Sample code: Delete Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentContainer( + public static void deleteWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java index 4fa48edf026f5..f010284cc0a8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java @@ -7,14 +7,14 @@ /** Samples for EnvironmentContainers Get. */ public final class EnvironmentContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/get.json */ /** - * Sample code: Get Environment Container. + * Sample code: Get Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentContainer( + public static void getWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java index 85a7bf57bd459..f831a3b20db5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java @@ -7,14 +7,14 @@ /** Samples for EnvironmentContainers List. */ public final class EnvironmentContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentContainer/list.json */ /** - * Sample code: List Environment Container. + * Sample code: List Workspace Environment Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentContainer( + public static void listWorkspaceEnvironmentContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentContainers() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java index a8c7e309af906..2fb93c2a96967 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; @@ -14,40 +15,45 @@ /** Samples for EnvironmentVersions CreateOrUpdate. */ public final class EnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Environment Version. + * Sample code: CreateOrUpdate Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentVersion( + public static void createOrUpdateWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties( - new EnvironmentVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withBuild( - new BuildContext() - .withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withCondaFile("string") - .withImage("docker.io/tensorflow/serving:latest") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new EnvironmentVersionInner() + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java index 972e72140e300..69042310efead 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java @@ -7,14 +7,14 @@ /** Samples for EnvironmentVersions Delete. */ public final class EnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/delete.json */ /** - * Sample code: Delete Environment Version. + * Sample code: Delete Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentVersion( + public static void deleteWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java index 04673d4e041d6..e9dfcee9bea1d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for EnvironmentVersions Get. */ public final class EnvironmentVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/get.json */ /** - * Sample code: Get Environment Version. + * Sample code: Get Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java index 9aa3338d518f8..b1ab24e365ca9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java @@ -7,14 +7,14 @@ /** Samples for EnvironmentVersions List. */ public final class EnvironmentVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/list.json */ /** - * Sample code: List Environment Version. + * Sample code: List Workspace Environment Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentVersion( + public static void listWorkspaceEnvironmentVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .environmentVersions() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java new file mode 100644 index 0000000000000..23f154903c87a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for EnvironmentVersions Publish. */ +public final class EnvironmentVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/EnvironmentVersion/publish.json + */ + /** + * Sample code: Publish Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .environmentVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java new file mode 100644 index 0000000000000..280e1fe6ec7d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.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.machinelearning.generated; + +/** Samples for Features Get. */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Feature/get.json + */ + /** + * Sample code: Get Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .features() + .getWithResponse( + "test-rg", "my-aml-workspace", "string", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java new file mode 100644 index 0000000000000..55e7220c82e54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.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.machinelearning.generated; + +/** Samples for Features List. */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Feature/list.json + */ + /** + * Sample code: List Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .features() + .list( + "test-rg", + "my-aml-workspace", + "string", + "string", + null, + "string", + "string", + "string", + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..cecf560fdcdf7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturesetContainers CreateOrUpdate. */ +public final class FeaturesetContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetContainers() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new FeaturesetContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsArchived(false)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java new file mode 100644 index 0000000000000..973655d730e76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for FeaturesetContainers Delete. */ +public final class FeaturesetContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/delete.json + */ + /** + * Sample code: Delete Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java new file mode 100644 index 0000000000000..1f0ab394bb1bd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.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.machinelearning.generated; + +/** Samples for FeaturesetContainers GetEntity. */ +public final class FeaturesetContainersGetEntitySamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/getEntity.json + */ + /** + * Sample code: GetEntity Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEntityWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java new file mode 100644 index 0000000000000..6dcfb67bf6439 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturesetContainers List. */ +public final class FeaturesetContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetContainer/list.json + */ + /** + * Sample code: List Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetContainers() + .list( + "test-rg", + "my-aml-workspace", + null, + "string", + ListViewType.ARCHIVED_ONLY, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java new file mode 100644 index 0000000000000..d39a9e3e251a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturesetVersions Backfill. */ +public final class FeaturesetVersionsBackfillSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/backfill.json + */ + /** + * Sample code: Backfill Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void backfillWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .backfill( + "test-rg", + "my-aml-workspace", + "string", + "string", + new FeaturesetVersionBackfillRequest() + .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) + .withDescription("string") + .withDisplayName("string") + .withFeatureWindow( + new FeatureWindow() + .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) + .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) + .withJobId("string") + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSparkConfiguration(mapOf("string", "string")) + .withTags(mapOf("string", "string")), + com.azure.core.util.Context.NONE); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..ed9d2da877ba2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; +import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; +import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; +import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; +import com.azure.resourcemanager.machinelearning.models.WeekDay; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturesetVersions CreateOrUpdate. */ +public final class FeaturesetVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .define("string") + .withExistingFeatureset("test-rg", "my-aml-workspace", "string") + .withProperties( + new FeaturesetVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withEntities(Arrays.asList("string")) + .withMaterializationSettings( + new MaterializationSettings() + .withNotification( + new NotificationSetting() + .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("string"))) + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSchedule( + new RecurrenceTrigger() + .withEndTime("string") + .withStartTime("string") + .withTimeZone("string") + .withFrequency(RecurrenceFrequency.DAY) + .withInterval(1) + .withSchedule( + new RecurrenceSchedule() + .withHours(Arrays.asList(1)) + .withMinutes(Arrays.asList(1)) + .withMonthDays(Arrays.asList(1)) + .withWeekDays(Arrays.asList(WeekDay.MONDAY)))) + .withSparkConfiguration(mapOf("string", "string")) + .withStoreType(MaterializationStoreType.ONLINE)) + .withSpecification(new FeaturesetSpecification().withPath("string")) + .withStage("string")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java new file mode 100644 index 0000000000000..1d88ae7ee4c68 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for FeaturesetVersions Delete. */ +public final class FeaturesetVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/delete.json + */ + /** + * Sample code: Delete Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java new file mode 100644 index 0000000000000..77c37ec3b6f54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.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.machinelearning.generated; + +/** Samples for FeaturesetVersions Get. */ +public final class FeaturesetVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/get.json + */ + /** + * Sample code: Get Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java new file mode 100644 index 0000000000000..591bba7d02aa8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturesetVersions List. */ +public final class FeaturesetVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturesetVersion/list.json + */ + /** + * Sample code: List Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featuresetVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + null, + "string", + ListViewType.ALL, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..c538fef5d110f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturestoreEntityContainers CreateOrUpdate. */ +public final class FeaturestoreEntityContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties( + new FeaturestoreEntityContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsArchived(false)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java new file mode 100644 index 0000000000000..f973313e10de0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for FeaturestoreEntityContainers Delete. */ +public final class FeaturestoreEntityContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/delete.json + */ + /** + * Sample code: Delete Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java new file mode 100644 index 0000000000000..6e489c1e8d503 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.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.machinelearning.generated; + +/** Samples for FeaturestoreEntityContainers GetEntity. */ +public final class FeaturestoreEntityContainersGetEntitySamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + */ + /** + * Sample code: GetEntity Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEntityWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java new file mode 100644 index 0000000000000..204225f5acf4e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturestoreEntityContainers List. */ +public final class FeaturestoreEntityContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityContainer/list.json + */ + /** + * Sample code: List Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityContainers() + .list( + "test-rg", + "my-aml-workspace", + null, + "string", + ListViewType.ALL, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..c8fe7360e2514 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.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.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FeatureDataType; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; +import com.azure.resourcemanager.machinelearning.models.IndexColumn; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for FeaturestoreEntityVersions CreateOrUpdate. */ +public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .define("string") + .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") + .withProperties( + new FeaturestoreEntityVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withIndexColumns( + Arrays + .asList(new IndexColumn().withColumnName("string").withDataType(FeatureDataType.DATETIME)))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java new file mode 100644 index 0000000000000..09de1e7593d96 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for FeaturestoreEntityVersions Delete. */ +public final class FeaturestoreEntityVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/delete.json + */ + /** + * Sample code: Delete Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java new file mode 100644 index 0000000000000..78f8be61ec3e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.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.machinelearning.generated; + +/** Samples for FeaturestoreEntityVersions Get. */ +public final class FeaturestoreEntityVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/get.json + */ + /** + * Sample code: Get Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java new file mode 100644 index 0000000000000..89ac8c64e1d36 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for FeaturestoreEntityVersions List. */ +public final class FeaturestoreEntityVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/FeaturestoreEntityVersion/list.json + */ + /** + * Sample code: List Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .featurestoreEntityVersions() + .list( + "test-rg", + "my-aml-workspace", + "string", + null, + "string", + ListViewType.ACTIVE_ONLY, + null, + null, + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java index 3022117eaeaa9..8d8b4e54b820f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Cancel. */ public final class JobsCancelSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/cancel.json */ /** * Sample code: Cancel Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java index 394e954bdf1d0..9268e6e3f2bda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java @@ -39,7 +39,7 @@ /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -107,7 +107,7 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -172,7 +172,7 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -217,7 +217,7 @@ public static void createOrUpdatePipelineJob( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -277,6 +277,7 @@ public static void createOrUpdateCommandJob( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java index 8634125dda6dd..6deb9ef79ffda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/delete.json */ /** * Sample code: Delete Job. @@ -15,6 +15,12 @@ public final class JobsDeleteSamples { * @param manager Entry point to MachineLearningManager. */ public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + manager + .jobs() + .delete( + "test-rg", + "my-aml-workspace", + "http://subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/my-favorite-aml-job", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java index de450689ce60a..141e68486f1f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -19,7 +19,7 @@ public static void getCommandJob(com.azure.resourcemanager.machinelearning.Machi } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -31,7 +31,7 @@ public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.Machin } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -43,7 +43,7 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java index a5e1fdc1b6c31..d832506fd751d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -17,11 +17,12 @@ public final class JobsListSamples { public static void listCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -31,11 +32,12 @@ public static void listCommandJob(com.azure.resourcemanager.machinelearning.Mach public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -45,11 +47,12 @@ public static void listPipelineJob(com.azure.resourcemanager.machinelearning.Mac public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); + .list( + "test-rg", "my-aml-workspace", null, "string", "string", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. @@ -57,6 +60,8 @@ public static void listSweepJob(com.azure.resourcemanager.machinelearning.Machin * @param manager Entry point to MachineLearningManager. */ public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().list("test-rg", "my-aml-workspace", null, null, null, null, com.azure.core.util.Context.NONE); + manager + .jobs() + .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java new file mode 100644 index 0000000000000..f58a253fe0dd3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.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.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; + +/** Samples for ManagedNetworkProvisions ProvisionManagedNetwork. */ +public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/provision.json + */ + /** + * Sample code: Provision ManagedNetwork. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void provisionManagedNetwork( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkProvisions() + .provisionManagedNetwork( + "test-rg", + "aml-workspace-name", + new ManagedNetworkProvisionOptions().withIncludeSpark(false), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..02d09ba5fe1fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; + +/** Samples for ManagedNetworkSettingsRule CreateOrUpdate. */ +public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/createOrUpdateRule.json + */ + /** + * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .define("rule_name_1") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties( + new FqdnOutboundRule() + .withCategory(RuleCategory.USER_DEFINED) + .withStatus(RuleStatus.ACTIVE) + .withDestination("destination_endpoint")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java new file mode 100644 index 0000000000000..79864035d1406 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.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.machinelearning.generated; + +/** Samples for ManagedNetworkSettingsRule Delete. */ +public final class ManagedNetworkSettingsRuleDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/deleteRule.json + */ + /** + * Sample code: Delete ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .delete("test-rg", "aml-workspace-name", "rule-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java new file mode 100644 index 0000000000000..1671246167167 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for ManagedNetworkSettingsRule Get. */ +public final class ManagedNetworkSettingsRuleGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/getRule.json + */ + /** + * Sample code: Get ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .managedNetworkSettingsRules() + .getWithResponse( + "test-rg", "aml-workspace-name", "name_of_the_fqdn_rule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java new file mode 100644 index 0000000000000..a61fba6b18b26 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for ManagedNetworkSettingsRule List. */ +public final class ManagedNetworkSettingsRuleListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ManagedNetwork/listRule.json + */ + /** + * Sample code: List ManagedNetworkSettingsRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listManagedNetworkSettingsRule( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsRules().list("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java index 677398e18bd28..aefa3d9450ced 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import java.util.HashMap; import java.util.Map; @@ -11,26 +12,30 @@ /** Samples for ModelContainers CreateOrUpdate. */ public final class ModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Container. + * Sample code: CreateOrUpdate Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelContainer( + public static void createOrUpdateWorkspaceModelContainer( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new ModelContainerProperties() - .withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); + .createOrUpdateWithResponse( + "testrg123", + "workspace123", + "testContainer", + new ModelContainerInner() + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java index 886e7ad2633df..ea347695e77db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelContainers Delete. */ public final class ModelContainersDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/delete.json */ /** - * Sample code: Delete Model Container. + * Sample code: Delete Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelContainers() .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java index d673453574060..6a474cca22a00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelContainers Get. */ public final class ModelContainersGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/get.json */ /** - * Sample code: Get Model Container. + * Sample code: Get Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelContainers() .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java index c093dc594bcbb..1750d901307f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelContainers List. */ public final class ModelContainersListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelContainer/list.json */ /** - * Sample code: List Model Container. + * Sample code: List Workspace Model Container. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelContainers().list("testrg123", "workspace123", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java index 878dfda340fdb..1117d9b867d24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.models.FlavorData; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; import java.util.HashMap; @@ -12,31 +13,36 @@ /** Samples for ModelVersions CreateOrUpdate. */ public final class ModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Version. + * Sample code: CreateOrUpdate Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelVersion( + public static void createOrUpdateWorkspaceModelVersion( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() - .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") - .withProperties( - new ModelVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType("CustomModel") - .withModelUri("string")) - .create(); + .createOrUpdateWithResponse( + "test-rg", + "my-aml-workspace", + "string", + "string", + new ModelVersionInner() + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java index a47b4bf440298..276ae64915d00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelVersions Delete. */ public final class ModelVersionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/delete.json */ /** - * Sample code: Delete Model Version. + * Sample code: Delete Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java index 6b3472f7fce9e..ae85728382447 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelVersions Get. */ public final class ModelVersionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/get.json */ /** - * Sample code: Get Model Version. + * Sample code: Get Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java index f5dffaa0e7938..c9955c6c93905 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java @@ -7,14 +7,15 @@ /** Samples for ModelVersions List. */ public final class ModelVersionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/list.json */ /** - * Sample code: List Model Version. + * Sample code: List Workspace Model Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .modelVersions() .list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java new file mode 100644 index 0000000000000..7ad13fc0ba0e9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** Samples for ModelVersions Publish. */ +public final class ModelVersionsPublishSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/ModelVersion/publish.json + */ + /** + * Sample code: Publish Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void publishWorkspaceModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .modelVersions() + .publish( + "test-rg", + "my-aml-workspace", + "string", + "string", + new DestinationAsset() + .withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java index 3043d9ccc18f4..4504aaeb734ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java @@ -24,7 +24,7 @@ /** Samples for OnlineDeployments CreateOrUpdate. */ public final class OnlineDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -89,7 +89,7 @@ public static void createOrUpdateKubernetesOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -151,6 +151,7 @@ public static void createOrUpdateManagedOnlineDeployment( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java index b55caae866863..0710f8349b6da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java @@ -7,14 +7,14 @@ /** Samples for OnlineDeployments Delete. */ public final class OnlineDeploymentsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineDeployment/delete.json */ /** - * Sample code: Delete Online Deployment. + * Sample code: Delete Workspace Online Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineDeployment( + public static void deleteWorkspaceOnlineDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineDeployments() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java index 52bb9772696f9..d903e377cd9f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java @@ -10,7 +10,7 @@ /** Samples for OnlineDeployments GetLogs. */ public final class OnlineDeploymentsGetLogsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java index 1f3ce3be094ee..880d27ce513d6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OnlineDeployments Get. */ public final class OnlineDeploymentsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -27,7 +27,7 @@ public static void getKubernetesOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java index 10373db08f210..8d0e473f5446c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for OnlineDeployments List. */ public final class OnlineDeploymentsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java index bf08722862482..49a309f57841a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java @@ -7,7 +7,7 @@ /** Samples for OnlineDeployments ListSkus. */ public final class OnlineDeploymentsListSkusSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -29,7 +29,7 @@ public static void listManagedOnlineDeploymentSkus( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java index 45cf7405cce15..8282a864c483a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for OnlineDeployments Update. */ public final class OnlineDeploymentsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -46,7 +46,7 @@ public static void updateManagedOnlineDeployment( } /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -78,6 +78,7 @@ public static void updateKubernetesOnlineDeployment( .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java index c5a7830b8a283..e725907cf86fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java @@ -17,14 +17,14 @@ /** Samples for OnlineEndpoints CreateOrUpdate. */ public final class OnlineEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Online Endpoint. + * Sample code: CreateOrUpdate Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateOnlineEndpoint( + public static void createOrUpdateWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() @@ -54,6 +54,7 @@ public static void createOrUpdateOnlineEndpoint( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java index e5728f1084b12..4d5c9c2502f2a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java @@ -7,14 +7,15 @@ /** Samples for OnlineEndpoints Delete. */ public final class OnlineEndpointsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/delete.json */ /** - * Sample code: Delete Online Endpoint. + * Sample code: Delete Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void deleteWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java index 7bb869bf92cb4..e02693307b42e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java @@ -7,14 +7,15 @@ /** Samples for OnlineEndpoints Get. */ public final class OnlineEndpointsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/get.json */ /** - * Sample code: Get Online Endpoint. + * Sample code: Get Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java index 0bddb517bc738..0507f4bda446b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java @@ -7,14 +7,14 @@ /** Samples for OnlineEndpoints GetToken. */ public final class OnlineEndpointsGetTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/getToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/getToken.json */ /** - * Sample code: GetToken Online Endpoint. + * Sample code: GetToken Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getTokenOnlineEndpoint( + public static void getTokenWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java index 6ec08e5fd2fd7..ca2258228cc5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java @@ -7,14 +7,14 @@ /** Samples for OnlineEndpoints ListKeys. */ public final class OnlineEndpointsListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/listKeys.json */ /** - * Sample code: ListKeys Online Endpoint. + * Sample code: ListKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysOnlineEndpoint( + public static void listKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java index 93ac7f0262cd3..ed51b268ec806 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java @@ -10,14 +10,15 @@ /** Samples for OnlineEndpoints List. */ public final class OnlineEndpointsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/list.json */ /** - * Sample code: List Online Endpoint. + * Sample code: List Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void listOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void listWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() .list( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java index 9055f46d6d28c..991cc99410ef1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java @@ -10,14 +10,14 @@ /** Samples for OnlineEndpoints RegenerateKeys. */ public final class OnlineEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/regenerateKeys.json */ /** - * Sample code: RegenerateKeys Online Endpoint. + * Sample code: RegenerateKeys Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void regenerateKeysOnlineEndpoint( + public static void regenerateKeysWorkspaceOnlineEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager .onlineEndpoints() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java index 617aea5a21ebb..d8ed58e8723b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java @@ -16,15 +16,15 @@ /** Samples for OnlineEndpoints Update. */ public final class OnlineEndpointsUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/OnlineEndpoint/update.json */ /** - * Sample code: Update Online Endpoint. + * Sample code: Update Workspace Online Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { + public static void updateWorkspaceOnlineEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { OnlineEndpoint resource = manager .onlineEndpoints() @@ -45,6 +45,7 @@ public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearnin .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java index ed6fb8689f40b..3cfc6452d5769 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/operationsList.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index d694e37a8e51a..fbc8746bedd3e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java index b51239dd78d90..6f04549bced51 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/delete.json */ /** * Sample code: WorkspaceDeletePrivateEndpointConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java index fae483260cc07..7621779de8031 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java index b815609fb93ba..a4f3fc2c02e6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java index 5f7ca342d38f5..902785ea8c973 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java index da38aefba0644..5416f915ca8f9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java @@ -7,7 +7,7 @@ /** Samples for Quotas List. */ public final class QuotasListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java index 7a5911910cf1a..9243af56bcde7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Quotas Update. */ public final class QuotasUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Quota/update.json */ /** * Sample code: update quotas. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..5d9af510ac4dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries CreateOrUpdate. */ +public final class RegistriesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/createOrUpdate-SystemCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountName("string") + .withAcrAccountSku("string") + .withArmResourceId(new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withAllowBlobPublicAccess(false) + .withArmResourceId(new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("string") + .withStorageAccountType("string")))))) + .create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/createOrUpdate-UserCreated.json + */ + /** + * Sample code: CreateOrUpdate Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .define("string") + .withRegion("string") + .withExistingResourceGroup("test-rg") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId(new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java new file mode 100644 index 0000000000000..2bb2d7e2a2be6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for Registries Delete. */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/delete.json + */ + /** + * Sample code: Delete Registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistry(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().delete("test-rg", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..33a1fb73804ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for Registries GetByResourceGroup. */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/get-UserCreated.json + */ + /** + * Sample code: Get Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/get-SystemCreated.json + */ + /** + * Sample code: Get Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..17498a962d50e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for Registries ListByResourceGroup. */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/list-UserCreated.json + */ + /** + * Sample code: List registries with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/list-SystemCreated.json + */ + /** + * Sample code: List registries with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java new file mode 100644 index 0000000000000..03c3a3bfe9a39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for Registries List. */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/listBySubscription.json + */ + /** + * Sample code: List registries by subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistriesBySubscription( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registries().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java new file mode 100644 index 0000000000000..8a5b5871a2efe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.models.AcrDetails; +import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; +import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; +import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries RemoveRegions. */ +public final class RegistriesRemoveRegionsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/removeRegions.json + */ + /** + * Sample code: Remove regions from registry. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void removeRegionsFromRegistry( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registries() + .removeRegions( + "test-rg", + "string", + new RegistryInner() + .withLocation("string") + .withTags(mapOf()) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku( + new Sku() + .withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .withDiscoveryUrl("string") + .withIntellectualPropertyPublisher("string") + .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) + .withMlFlowRegistryUri("string") + .withRegistryPrivateEndpointConnections( + Arrays + .asList( + new RegistryPrivateEndpointConnection() + .withId("string") + .withLocation("string") + .withGroupIds(Arrays.asList("string")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState() + .withActionsRequired("string") + .withDescription("string") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withProvisioningState("string"))) + .withPublicNetworkAccess("string") + .withRegionDetails( + Arrays + .asList( + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays + .asList( + new AcrDetails() + .withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount() + .withAcrAccountName("string") + .withAcrAccountSku("string") + .withArmResourceId( + new ArmResourceId().withResourceId("string"))) + .withUserCreatedAcrAccount( + new UserCreatedAcrAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))) + .withLocation("string") + .withStorageAccountDetails( + Arrays + .asList( + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount() + .withAllowBlobPublicAccess(false) + .withArmResourceId( + new ArmResourceId().withResourceId("string")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("string") + .withStorageAccountType("string")) + .withUserCreatedStorageAccount( + new UserCreatedStorageAccount() + .withArmResourceId( + new ArmResourceId().withResourceId("string"))))))), + com.azure.core.util.Context.NONE); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java new file mode 100644 index 0000000000000..6d12424fcd4b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Registry; +import com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Registries Update. */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/update-UserCreated.json + */ + /** + * Sample code: Update Registry with user created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithUserCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + Registry resource = + manager + .registries() + .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new RegistryPartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) + .apply(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registries/update-SystemCreated.json + */ + /** + * Sample code: Update Registry with system created accounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateRegistryWithSystemCreatedAccounts( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + Registry resource = + manager + .registries() + .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf()) + .withIdentity( + new RegistryPartialManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withSku( + new PartialSku() + .withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..828f9e038c30d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeContainers CreateOrUpdate. */ +public final class RegistryCodeContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new CodeContainerProperties() + .withDescription("string") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java new file mode 100644 index 0000000000000..44b1069614b02 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryCodeContainers Delete. */ +public final class RegistryCodeContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/delete.json + */ + /** + * Sample code: Delete Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java new file mode 100644 index 0000000000000..2e99e0785785c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.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.machinelearning.generated; + +/** Samples for RegistryCodeContainers Get. */ +public final class RegistryCodeContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/get.json + */ + /** + * Sample code: Get Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeContainers() + .getWithResponse("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java new file mode 100644 index 0000000000000..bc9a782d0a832 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for RegistryCodeContainers List. */ +public final class RegistryCodeContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeContainer/list.json + */ + /** + * Sample code: List Registry Code Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryCodeContainers().list("testrg123", "testregistry", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java new file mode 100644 index 0000000000000..1a8167b91f1e0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryCodeVersions CreateOrGetStartPendingUpload. */ +public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..5e85dbc3cc88a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryCodeVersions CreateOrUpdate. */ +public final class RegistryCodeVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .define("string") + .withExistingCode("test-rg", "my-aml-registry", "string") + .withProperties( + new CodeVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withCodeUri("fakeTokenPlaceholder")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java new file mode 100644 index 0000000000000..c1e3a972c5e11 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryCodeVersions Delete. */ +public final class RegistryCodeVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/delete.json + */ + /** + * Sample code: Delete Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java new file mode 100644 index 0000000000000..cd4083b0825b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.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.machinelearning.generated; + +/** Samples for RegistryCodeVersions Get. */ +public final class RegistryCodeVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/get.json + */ + /** + * Sample code: Get Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java new file mode 100644 index 0000000000000..996fe8c01aefb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.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.machinelearning.generated; + +/** Samples for RegistryCodeVersions List. */ +public final class RegistryCodeVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/CodeVersion/list.json + */ + /** + * Sample code: List Registry Code Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryCodeVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryCodeVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..d5d44197655f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentContainers CreateOrUpdate. */ +public final class RegistryComponentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .define("string") + .withExistingRegistry("test-rg", "my-aml-registry") + .withProperties( + new ComponentContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java new file mode 100644 index 0000000000000..df5180ed144cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentContainers Delete. */ +public final class RegistryComponentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/delete.json + */ + /** + * Sample code: Delete Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .delete("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java new file mode 100644 index 0000000000000..c5d60ba6a238a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentContainers Get. */ +public final class RegistryComponentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/get.json + */ + /** + * Sample code: Get Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .getWithResponse("test-rg", "my-aml-registry", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java new file mode 100644 index 0000000000000..2dacfb947c50c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentContainers List. */ +public final class RegistryComponentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentContainer/list.json + */ + /** + * Sample code: List Registry Component Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentContainers() + .list("test-rg", "my-aml-registry", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..d2126e76f1e23 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.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.machinelearning.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryComponentVersions CreateOrUpdate. */ +public final class RegistryComponentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager + .registryComponentVersions() + .define("string") + .withExistingComponent("test-rg", "my-aml-registry", "string") + .withProperties( + new ComponentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withComponentSpec( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", + Object.class, + SerializerEncoding.JSON))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java new file mode 100644 index 0000000000000..8ceb0948db089 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentVersions Delete. */ +public final class RegistryComponentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/delete.json + */ + /** + * Sample code: Delete Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java new file mode 100644 index 0000000000000..cca4460448dfe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentVersions Get. */ +public final class RegistryComponentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/get.json + */ + /** + * Sample code: Get Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java new file mode 100644 index 0000000000000..6a58e1e5604a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.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.machinelearning.generated; + +/** Samples for RegistryComponentVersions List. */ +public final class RegistryComponentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ComponentVersion/list.json + */ + /** + * Sample code: List Registry Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryComponentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryComponentVersions() + .list("test-rg", "my-aml-registry", "string", "string", 1, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..3daefc1021a7c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.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.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.DataType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryDataContainers CreateOrUpdate. */ +public final class RegistryDataContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataContainers() + .define("string") + .withExistingRegistry("test-rg", "registryName") + .withProperties( + new DataContainerProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsArchived(false) + .withDataType(DataType.URI_FOLDER)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java new file mode 100644 index 0000000000000..ee1e6e0f2c09f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for RegistryDataContainers Delete. */ +public final class RegistryDataContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/delete.json + */ + /** + * Sample code: Delete Registry Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryDataContainers().delete("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java new file mode 100644 index 0000000000000..281de7bf8bbbc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.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.machinelearning.generated; + +/** Samples for RegistryDataContainers Get. */ +public final class RegistryDataContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/get.json + */ + /** + * Sample code: Get Registry Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataContainers() + .getWithResponse("test-rg", "registryName", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java new file mode 100644 index 0000000000000..3e6a2d6825e6e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for RegistryDataContainers List. */ +public final class RegistryDataContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataContainer/registryList.json + */ + /** + * Sample code: RegistryList Registry Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void registryListRegistryDataContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataContainers() + .list("test-rg", "registryName", null, ListViewType.ALL, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java new file mode 100644 index 0000000000000..69385f87a2a1e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.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.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto; + +/** Samples for RegistryDataReferences GetBlobReferenceSas. */ +public final class RegistryDataReferencesGetBlobReferenceSasSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/DataReference/getBlobReferenceSAS.json + */ + /** + * Sample code: GetBlobReferenceSAS Data Reference. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getBlobReferenceSASDataReference( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataReferences() + .getBlobReferenceSasWithResponse( + "test-rg", + "registryName", + "string", + "string", + new GetBlobReferenceSasRequestDto() + .withAssetId("string") + .withBlobUri("https://www.contoso.com/example"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java new file mode 100644 index 0000000000000..757c0b59049ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryDataVersions CreateOrGetStartPendingUpload. */ +public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.NONE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..e9af0ff3e1e7f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.MLTableData; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryDataVersions CreateOrUpdate. */ +public final class RegistryDataVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataVersions() + .define("string") + .withExistingData("test-rg", "registryName", "string") + .withProperties( + new MLTableData() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withDataUri("string") + .withReferencedUris(Arrays.asList("string"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java new file mode 100644 index 0000000000000..fa3dd051a29c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryDataVersions Delete. */ +public final class RegistryDataVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/delete.json + */ + /** + * Sample code: Delete Registry Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataVersions() + .delete("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java new file mode 100644 index 0000000000000..54c51f38e0d3e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.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.machinelearning.generated; + +/** Samples for RegistryDataVersions Get. */ +public final class RegistryDataVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/get.json + */ + /** + * Sample code: Get Registry Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataVersions() + .getWithResponse("test-rg", "registryName", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java new file mode 100644 index 0000000000000..2ceffa404b67d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** Samples for RegistryDataVersions List. */ +public final class RegistryDataVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/DataVersionBase/registryList.json + */ + /** + * Sample code: RegistryList Registry Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void registryListRegistryDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryDataVersions() + .list( + "test-rg", + "registryName", + "string", + "string", + 1, + null, + "string", + ListViewType.ARCHIVED_ONLY, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..75cb8bdb7d636 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentContainers CreateOrUpdate. */ +public final class RegistryEnvironmentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .define("testEnvironment") + .withExistingRegistry("testrg123", "testregistry") + .withProperties( + new EnvironmentContainerProperties() + .withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java new file mode 100644 index 0000000000000..fdbde60bedecf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentContainers Delete. */ +public final class RegistryEnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/delete.json + */ + /** + * Sample code: Delete Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .delete("testrg123", "testregistry", "testContainer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java new file mode 100644 index 0000000000000..2b0e62b354a0b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentContainers Get. */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .getWithResponse("testrg123", "testregistry", "testEnvironment", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java new file mode 100644 index 0000000000000..16d2bf5df6f70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentContainers List. */ +public final class RegistryEnvironmentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentContainer/list.json + */ + /** + * Sample code: List Registry Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentContainers() + .list("testrg123", "testregistry", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..f176a52e92e56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.BuildContext; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryEnvironmentVersions CreateOrUpdate. */ +public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .define("string") + .withExistingEnvironment("test-rg", "my-aml-registry", "string") + .withProperties( + new EnvironmentVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild( + new BuildContext() + .withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java new file mode 100644 index 0000000000000..18e26035ea1ff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentVersions Delete. */ +public final class RegistryEnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/delete.json + */ + /** + * Sample code: Delete Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java new file mode 100644 index 0000000000000..4f5de0e154e6e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentVersions Get. */ +public final class RegistryEnvironmentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/get.json + */ + /** + * Sample code: Get Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java new file mode 100644 index 0000000000000..8f798806180b3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.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.machinelearning.generated; + +/** Samples for RegistryEnvironmentVersions List. */ +public final class RegistryEnvironmentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/EnvironmentVersion/list.json + */ + /** + * Sample code: List Registry Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryEnvironmentVersions() + .list("test-rg", "my-aml-regsitry", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..3a3ad211b9701 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelContainers CreateOrUpdate. */ +public final class RegistryModelContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .define("testContainer") + .withExistingRegistry("testrg123", "registry123") + .withProperties( + new ModelContainerProperties() + .withDescription("Model container description") + .withTags(mapOf("tag1", "value1", "tag2", "value2"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java new file mode 100644 index 0000000000000..74aff62ff1d65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryModelContainers Delete. */ +public final class RegistryModelContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/delete.json + */ + /** + * Sample code: Delete Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .delete("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java new file mode 100644 index 0000000000000..303c132b5bbca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.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.machinelearning.generated; + +/** Samples for RegistryModelContainers Get. */ +public final class RegistryModelContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/get.json + */ + /** + * Sample code: Get Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .getWithResponse("testrg123", "registry123", "testContainer", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java new file mode 100644 index 0000000000000..eaaae5d01bdfc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.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.machinelearning.generated; + +/** Samples for RegistryModelContainers List. */ +public final class RegistryModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelContainer/list.json + */ + /** + * Sample code: List Registry Model Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelContainers() + .list("testrg123", "registry123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java new file mode 100644 index 0000000000000..4e775693ab5ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; + +/** Samples for RegistryModelVersions CreateOrGetStartPendingUpload. */ +public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + */ + /** + * Sample code: CreateOrGetStartPendingUpload Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrGetStartPendingUploadRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .createOrGetStartPendingUploadWithResponse( + "test-rg", + "registryName", + "string", + "string", + new PendingUploadRequestDto() + .withPendingUploadId("string") + .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..660737017cf6a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FlavorData; +import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RegistryModelVersions CreateOrUpdate. */ +public final class RegistryModelVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .define("string") + .withExistingModel("test-rg", "my-aml-registry", "string") + .withProperties( + new ModelVersionProperties() + .withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) + .withModelType("CustomModel") + .withModelUri("string")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java new file mode 100644 index 0000000000000..bea2032c46af7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.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.machinelearning.generated; + +/** Samples for RegistryModelVersions Delete. */ +public final class RegistryModelVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/delete.json + */ + /** + * Sample code: Delete Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .delete("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java new file mode 100644 index 0000000000000..96a2afdfa9584 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.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.machinelearning.generated; + +/** Samples for RegistryModelVersions Get. */ +public final class RegistryModelVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/get.json + */ + /** + * Sample code: Get Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .getWithResponse("test-rg", "my-aml-registry", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java new file mode 100644 index 0000000000000..bf2b655db94b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** Samples for RegistryModelVersions List. */ +public final class RegistryModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Registry/ModelVersion/list.json + */ + /** + * Sample code: List Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRegistryModelVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager + .registryModelVersions() + .list( + "test-rg", + "my-aml-registry", + "string", + null, + "string", + 1, + "string", + "string", + "string", + "string", + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java index f58b680aaf5b0..3513cfc74cd8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -54,6 +54,7 @@ public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearn .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java index 8425d2bdae803..fb976b6d7d0d6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java index ed4851ee6751a..ab97fff93f7fb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/get.json */ /** * Sample code: Get Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java index a73377880c36f..cc1210ad85b5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Schedules List. */ public final class SchedulesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Schedule/list.json */ /** * Sample code: List Schedules. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java index 610f0219a60a3..94657dc8ccc46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Usage/list.json */ /** * Sample code: List Usages. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java index bd3b35c93152d..123d804e7e0c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java @@ -7,7 +7,7 @@ /** Samples for VirtualMachineSizes List. */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java index ee18b1460db3a..bdc456f94c6f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java @@ -10,7 +10,7 @@ /** Samples for WorkspaceConnections Create. */ public final class WorkspaceConnectionsCreateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java index 70584254ef26d..91e9baf8629c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WorkspaceConnections Delete. */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java index c5c1c28e42fd3..aa943d566ac49 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WorkspaceConnections Get. */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java index a555209830d68..62eee66976962 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for WorkspaceConnections List. */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java index a2e9ec836c5de..4941f72dd52c8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java @@ -7,7 +7,7 @@ /** Samples for WorkspaceFeatures List. */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java index f4db9bbdf9ca2..046ce0c2cb03a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -76,6 +76,7 @@ public static void createWorkspace(com.azure.resourcemanager.machinelearning.Mac .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java index c1fd156d125f6..e7947d9a4a785 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -15,6 +15,6 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to MachineLearningManager. */ public static void deleteWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().delete("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().delete("workspace-1234", "testworkspace", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java index 686192ecc6e0c..d2b2af1baac34 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java @@ -12,7 +12,7 @@ /** Samples for Workspaces Diagnose. */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -40,6 +40,7 @@ public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.M com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java index 179c4e8e29b0b..cd58651ef3721 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/get.json */ /** * Sample code: Get Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java index 669be8f3e6d32..fbe5d78237ccd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java index ccbe6102435a5..a3f2963c98246 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListKeys. */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java index ef8427324993f..f89c4e9e197ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListNotebookAccessToken. */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java index 3e287c705f692..b95f1d967cfd9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListNotebookKeys. */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java index efa218684f9b3..628a2468685c7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java index 75c206e34e8ab..c26d5b79a27d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java index 9394db609d6c0..74db5ca58d65f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListStorageAccountKeys. */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java index 127a903e671c4..e4c03c9eaad94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces PrepareNotebook. */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java index 6f3d88cf74730..def992560211d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ResyncKeys. */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java index 5eb660d26642b..c3373763dab39 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2023-10-01/examples/Workspace/update.json */ /** * Sample code: Update Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java deleted file mode 100644 index c7c3e2424e74e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AksNetworkingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksNetworkingConfiguration model = - BinaryData - .fromString( - "{\"subnetId\":\"pilguooqjag\",\"serviceCidr\":\"itgueiookjbs\",\"dnsServiceIP\":\"rtdtpdelq\",\"dockerBridgeCidr\":\"slmot\"}") - .toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("pilguooqjag", model.subnetId()); - Assertions.assertEquals("itgueiookjbs", model.serviceCidr()); - Assertions.assertEquals("rtdtpdelq", model.dnsServiceIp()); - Assertions.assertEquals("slmot", model.dockerBridgeCidr()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksNetworkingConfiguration model = - new AksNetworkingConfiguration() - .withSubnetId("pilguooqjag") - .withServiceCidr("itgueiookjbs") - .withDnsServiceIp("rtdtpdelq") - .withDockerBridgeCidr("slmot"); - model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("pilguooqjag", model.subnetId()); - Assertions.assertEquals("itgueiookjbs", model.serviceCidr()); - Assertions.assertEquals("rtdtpdelq", model.dnsServiceIp()); - Assertions.assertEquals("slmot", model.dockerBridgeCidr()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java deleted file mode 100644 index 382335e46a8b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; - -public final class AmlComputeNodeInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodeInformation model = - BinaryData - .fromString( - "{\"nodeId\":\"hsmtxpsiebtfhvp\",\"privateIpAddress\":\"apskrdqm\",\"publicIpAddress\":\"jdhtldwkyzxu\",\"port\":379697539,\"nodeState\":\"unusable\",\"runId\":\"scwsv\"}") - .toObject(AmlComputeNodeInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodeInformation model = new AmlComputeNodeInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodeInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java deleted file mode 100644 index bdb79d003a025..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; - -public final class AmlComputeNodesInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodesInformation model = - BinaryData - .fromString( - "{\"nodes\":[{\"nodeId\":\"zjancuxr\",\"privateIpAddress\":\"wbavxbniwdj\",\"publicIpAddress\":\"zt\",\"port\":593552862,\"nodeState\":\"unusable\",\"runId\":\"xytxhpzxbz\"},{\"nodeId\":\"zabglcuhxwt\",\"privateIpAddress\":\"yqiklbbovplwzb\",\"publicIpAddress\":\"gy\",\"port\":1408848677,\"nodeState\":\"idle\",\"runId\":\"mkfssxqukkfplgm\"},{\"nodeId\":\"xnkjzkdesl\",\"privateIpAddress\":\"lopwiyig\",\"publicIpAddress\":\"pkdwzbai\",\"port\":830727700,\"nodeState\":\"unusable\",\"runId\":\"m\"}],\"nextLink\":\"qupedeojnab\"}") - .toObject(AmlComputeNodesInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodesInformation model = new AmlComputeNodesInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodesInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java deleted file mode 100644 index 4dd999feefe24..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"gjofjd\",\"resource\":\"qs\",\"operation\":\"eupewnwreitjz\",\"description\":\"lusarh\"}") - .toObject(AmlOperationDisplay.class); - Assertions.assertEquals("gjofjd", model.provider()); - Assertions.assertEquals("qs", model.resource()); - Assertions.assertEquals("eupewnwreitjz", model.operation()); - Assertions.assertEquals("lusarh", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationDisplay model = - new AmlOperationDisplay() - .withProvider("gjofjd") - .withResource("qs") - .withOperation("eupewnwreitjz") - .withDescription("lusarh"); - model = BinaryData.fromObject(model).toObject(AmlOperationDisplay.class); - Assertions.assertEquals("gjofjd", model.provider()); - Assertions.assertEquals("qs", model.resource()); - Assertions.assertEquals("eupewnwreitjz", model.operation()); - Assertions.assertEquals("lusarh", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java deleted file mode 100644 index 2259819743556..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java +++ /dev/null @@ -1,48 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationInner model = - BinaryData - .fromString( - "{\"name\":\"siznto\",\"display\":{\"provider\":\"a\",\"resource\":\"ajpsquc\",\"operation\":\"o\",\"description\":\"dkfo\"},\"isDataAction\":false}") - .toObject(AmlOperationInner.class); - Assertions.assertEquals("siznto", model.name()); - Assertions.assertEquals("a", model.display().provider()); - Assertions.assertEquals("ajpsquc", model.display().resource()); - Assertions.assertEquals("o", model.display().operation()); - Assertions.assertEquals("dkfo", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationInner model = - new AmlOperationInner() - .withName("siznto") - .withDisplay( - new AmlOperationDisplay() - .withProvider("a") - .withResource("ajpsquc") - .withOperation("o") - .withDescription("dkfo")) - .withIsDataAction(false); - model = BinaryData.fromObject(model).toObject(AmlOperationInner.class); - Assertions.assertEquals("siznto", model.name()); - Assertions.assertEquals("a", model.display().provider()); - Assertions.assertEquals("ajpsquc", model.display().resource()); - Assertions.assertEquals("o", model.display().operation()); - Assertions.assertEquals("dkfo", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java deleted file mode 100644 index 5401da3f66c4b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java +++ /dev/null @@ -1,72 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import com.azure.resourcemanager.machinelearning.models.AmlOperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false},{\"name\":\"noi\",\"display\":{\"provider\":\"lrxybqsoq\",\"resource\":\"gkdmb\",\"operation\":\"zlobcufpd\",\"description\":\"rbt\"},\"isDataAction\":true},{\"name\":\"nq\",\"display\":{\"provider\":\"qgn\",\"resource\":\"ooojywifsqe\",\"operation\":\"agdfmglzlh\",\"description\":\"rifkwm\"},\"isDataAction\":true}]}") - .toObject(AmlOperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationListResult model = - new AmlOperationListResult() - .withValue( - Arrays - .asList( - new AmlOperationInner() - .withName("quvgjxpybczme") - .withDisplay( - new AmlOperationDisplay() - .withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withIsDataAction(false), - new AmlOperationInner() - .withName("noi") - .withDisplay( - new AmlOperationDisplay() - .withProvider("lrxybqsoq") - .withResource("gkdmb") - .withOperation("zlobcufpd") - .withDescription("rbt")) - .withIsDataAction(true), - new AmlOperationInner() - .withName("nq") - .withDisplay( - new AmlOperationDisplay() - .withProvider("qgn") - .withResource("ooojywifsqe") - .withOperation("agdfmglzlh") - .withDescription("rifkwm")) - .withIsDataAction(true))); - model = BinaryData.fromObject(model).toObject(AmlOperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java deleted file mode 100644 index 4500fbd744095..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlToken; - -public final class AmlTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlToken model = BinaryData.fromString("{\"identityType\":\"AMLToken\"}").toObject(AmlToken.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlToken model = new AmlToken(); - model = BinaryData.fromObject(model).toObject(AmlToken.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java deleted file mode 100644 index acef398e64afe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import org.junit.jupiter.api.Assertions; - -public final class AmlUserFeatureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlUserFeatureInner model = - BinaryData - .fromString("{\"id\":\"pkt\",\"displayName\":\"ylkmqp\",\"description\":\"yhlfb\"}") - .toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("pkt", model.id()); - Assertions.assertEquals("ylkmqp", model.displayName()); - Assertions.assertEquals("yhlfb", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlUserFeatureInner model = - new AmlUserFeatureInner().withId("pkt").withDisplayName("ylkmqp").withDescription("yhlfb"); - model = BinaryData.fromObject(model).toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("pkt", model.id()); - Assertions.assertEquals("ylkmqp", model.displayName()); - Assertions.assertEquals("yhlfb", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java deleted file mode 100644 index bf7b889c21a85..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java +++ /dev/null @@ -1,55 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetBase model = - BinaryData - .fromString( - "{\"isAnonymous\":false,\"isArchived\":false,\"description\":\"szfjvfbgofelja\",\"properties\":{\"ojnal\":\"mqhldvrii\",\"qhhahhxvrhmzkwpj\":\"hfkvtvsexsowuel\",\"ughftqsx\":\"wws\"},\"tags\":{\"grjguufzd\":\"ujxukndxd\",\"whbotzingamv\":\"syqtfi\"}}") - .toObject(AssetBase.class); - Assertions.assertEquals("szfjvfbgofelja", model.description()); - Assertions.assertEquals("mqhldvrii", model.properties().get("ojnal")); - Assertions.assertEquals("ujxukndxd", model.tags().get("grjguufzd")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetBase model = - new AssetBase() - .withDescription("szfjvfbgofelja") - .withProperties(mapOf("ojnal", "mqhldvrii", "qhhahhxvrhmzkwpj", "hfkvtvsexsowuel", "ughftqsx", "wws")) - .withTags(mapOf("grjguufzd", "ujxukndxd", "whbotzingamv", "syqtfi")) - .withIsAnonymous(false) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(AssetBase.class); - Assertions.assertEquals("szfjvfbgofelja", model.description()); - Assertions.assertEquals("mqhldvrii", model.properties().get("ojnal")); - Assertions.assertEquals("ujxukndxd", model.tags().get("grjguufzd")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java deleted file mode 100644 index 68efc629022b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetContainer; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetContainer model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"qnyhgb\",\"nextVersion\":\"tjivfxzsjabib\",\"description\":\"stawfsdjpvkv\",\"properties\":{\"budurgkakmo\":\"xbkzbzkdvncj\",\"gzrf\":\"zhjjklffhmouwq\",\"ikayuhqlbjbsybb\":\"eeyebi\"},\"tags\":{\"slthaq\":\"vtldgmfpgvmpip\"}}") - .toObject(AssetContainer.class); - Assertions.assertEquals("stawfsdjpvkv", model.description()); - Assertions.assertEquals("xbkzbzkdvncj", model.properties().get("budurgkakmo")); - Assertions.assertEquals("vtldgmfpgvmpip", model.tags().get("slthaq")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetContainer model = - new AssetContainer() - .withDescription("stawfsdjpvkv") - .withProperties( - mapOf("budurgkakmo", "xbkzbzkdvncj", "gzrf", "zhjjklffhmouwq", "ikayuhqlbjbsybb", "eeyebi")) - .withTags(mapOf("slthaq", "vtldgmfpgvmpip")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(AssetContainer.class); - Assertions.assertEquals("stawfsdjpvkv", model.description()); - Assertions.assertEquals("xbkzbzkdvncj", model.properties().get("budurgkakmo")); - Assertions.assertEquals("vtldgmfpgvmpip", model.tags().get("slthaq")); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java deleted file mode 100644 index b29a8197e2ab3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobInput model = - BinaryData.fromString("{\"mode\":\"ReadOnlyMount\",\"uri\":\"fgbrtt\"}").toObject(AssetJobInput.class); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("fgbrtt", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobInput model = new AssetJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("fgbrtt"); - model = BinaryData.fromObject(model).toObject(AssetJobInput.class); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("fgbrtt", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java deleted file mode 100644 index 9b241f855a052..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobOutput model = - BinaryData.fromString("{\"mode\":\"Upload\",\"uri\":\"lkiexhajlfnthiq\"}").toObject(AssetJobOutput.class); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("lkiexhajlfnthiq", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobOutput model = new AssetJobOutput().withMode(OutputDeliveryMode.UPLOAD).withUri("lkiexhajlfnthiq"); - model = BinaryData.fromObject(model).toObject(AssetJobOutput.class); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("lkiexhajlfnthiq", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java deleted file mode 100644 index 11357aca4ae81..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetReferenceBase; - -public final class AssetReferenceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetReferenceBase model = - BinaryData.fromString("{\"referenceType\":\"AssetReferenceBase\"}").toObject(AssetReferenceBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetReferenceBase model = new AssetReferenceBase(); - model = BinaryData.fromObject(model).toObject(AssetReferenceBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java deleted file mode 100644 index 0ee7c299110b0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import org.junit.jupiter.api.Assertions; - -public final class AssignedUserTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssignedUser model = - BinaryData - .fromString("{\"objectId\":\"mykyujxsglhs\",\"tenantId\":\"rryejylmbkzudnig\"}") - .toObject(AssignedUser.class); - Assertions.assertEquals("mykyujxsglhs", model.objectId()); - Assertions.assertEquals("rryejylmbkzudnig", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssignedUser model = new AssignedUser().withObjectId("mykyujxsglhs").withTenantId("rryejylmbkzudnig"); - model = BinaryData.fromObject(model).toObject(AssignedUser.class); - Assertions.assertEquals("mykyujxsglhs", model.objectId()); - Assertions.assertEquals("rryejylmbkzudnig", model.tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java deleted file mode 100644 index 44430f0e8225b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon; - -public final class AutoForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoForecastHorizon model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoForecastHorizon model = new AutoForecastHorizon(); - model = BinaryData.fromObject(model).toObject(AutoForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java deleted file mode 100644 index 789779d401001..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java +++ /dev/null @@ -1,168 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLJob model = - BinaryData - .fromString( - "{\"jobType\":\"AutoML\",\"environmentId\":\"uttdiygbp\",\"environmentVariables\":{\"ctwwgzw\":\"swmtxk\",\"og\":\"jlmec\"},\"outputs\":{\"zaifghtmoqqtlff\":{\"jobOutputType\":\"JobOutput\",\"description\":\"vne\"},\"avfqnvhnqoewdogi\":{\"jobOutputType\":\"JobOutput\",\"description\":\"bkrkjj\"},\"t\":{\"jobOutputType\":\"JobOutput\",\"description\":\"tesypvidbztjh\"},\"p\":{\"jobOutputType\":\"JobOutput\",\"description\":\"ovnynkbwetnju\"}},\"resources\":{\"dockerArgs\":\"kzyaup\",\"shmSize\":\"ccxnafbwqroohtuo\",\"instanceCount\":339434421,\"instanceType\":\"nur\",\"properties\":{\"ecmslclbl\":\"datamghihp\",\"bsjuscvsfx\":\"datajxl\",\"cydrtceukdqkk\":\"datagctmgxuupbezq\",\"chillcecf\":\"dataihztgeqmgqzgwldo\"}},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Debug\",\"targetColumnName\":\"aoaguhicqlli\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"ac\",\"description\":\"vhrweftkwqejpmv\"}},\"componentId\":\"ehaepwamcxtc\",\"computeId\":\"upeuknijduyye\",\"displayName\":\"ydjfb\",\"experimentName\":\"yv\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"xjcmmzrrsc\":{\"endpoint\":\"wikdmh\",\"errorMessage\":\"kuflgbh\",\"jobServiceType\":\"uacdixmxuf\",\"port\":2084049172,\"properties\":{\"kfnozoeoqbvj\":\"qg\",\"ay\":\"vefgwbmqjchntas\",\"wyvf\":\"xbulpzealbmqkyo\"},\"status\":\"btsuahxs\"},\"k\":{\"endpoint\":\"i\",\"errorMessage\":\"drnpxqwodiff\",\"jobServiceType\":\"cjrmmua\",\"port\":1056195369,\"properties\":{\"e\":\"jogjonmc\",\"akpoldtvevbo\":\"oyzbamwineofvf\",\"zjknyuxg\":\"lz\",\"mrdixtreki\":\"ttxpnrupza\"},\"status\":\"wyskbruffgll\"}},\"status\":\"Paused\",\"description\":\"lxhrp\",\"properties\":{\"iryr\":\"mblcouqehbhbcds\",\"pmbltoormkfql\":\"ndo\",\"nbmjksibjgsjjxxa\":\"xldykalsygaolnjp\"},\"tags\":{\"gxyivpinbmh\":\"nadzyq\",\"bkezn\":\"bjijkgqxnh\",\"nggiycwkdtaa\":\"aujvaa\",\"ekaum\":\"xw\"}}") - .toObject(AutoMLJob.class); - Assertions.assertEquals("lxhrp", model.description()); - Assertions.assertEquals("mblcouqehbhbcds", model.properties().get("iryr")); - Assertions.assertEquals("nadzyq", model.tags().get("gxyivpinbmh")); - Assertions.assertEquals("ehaepwamcxtc", model.componentId()); - Assertions.assertEquals("upeuknijduyye", model.computeId()); - Assertions.assertEquals("ydjfb", model.displayName()); - Assertions.assertEquals("yv", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("wikdmh", model.services().get("xjcmmzrrsc").endpoint()); - Assertions.assertEquals("uacdixmxuf", model.services().get("xjcmmzrrsc").jobServiceType()); - Assertions.assertEquals(2084049172, model.services().get("xjcmmzrrsc").port()); - Assertions.assertEquals("qg", model.services().get("xjcmmzrrsc").properties().get("kfnozoeoqbvj")); - Assertions.assertEquals("uttdiygbp", model.environmentId()); - Assertions.assertEquals("swmtxk", model.environmentVariables().get("ctwwgzw")); - Assertions.assertEquals("vne", model.outputs().get("zaifghtmoqqtlff").description()); - Assertions.assertEquals(339434421, model.resources().instanceCount()); - Assertions.assertEquals("nur", model.resources().instanceType()); - Assertions.assertEquals("kzyaup", model.resources().dockerArgs()); - Assertions.assertEquals("ccxnafbwqroohtuo", model.resources().shmSize()); - Assertions.assertEquals(LogVerbosity.DEBUG, model.taskDetails().logVerbosity()); - Assertions.assertEquals("aoaguhicqlli", model.taskDetails().targetColumnName()); - Assertions.assertEquals("vhrweftkwqejpmv", model.taskDetails().trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("ac", model.taskDetails().trainingData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLJob model = - new AutoMLJob() - .withDescription("lxhrp") - .withProperties( - mapOf("iryr", "mblcouqehbhbcds", "pmbltoormkfql", "ndo", "nbmjksibjgsjjxxa", "xldykalsygaolnjp")) - .withTags( - mapOf("gxyivpinbmh", "nadzyq", "bkezn", "bjijkgqxnh", "nggiycwkdtaa", "aujvaa", "ekaum", "xw")) - .withComponentId("ehaepwamcxtc") - .withComputeId("upeuknijduyye") - .withDisplayName("ydjfb") - .withExperimentName("yv") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "xjcmmzrrsc", - new JobService() - .withEndpoint("wikdmh") - .withJobServiceType("uacdixmxuf") - .withPort(2084049172) - .withProperties( - mapOf("kfnozoeoqbvj", "qg", "ay", "vefgwbmqjchntas", "wyvf", "xbulpzealbmqkyo")), - "k", - new JobService() - .withEndpoint("i") - .withJobServiceType("cjrmmua") - .withPort(1056195369) - .withProperties( - mapOf( - "e", - "jogjonmc", - "akpoldtvevbo", - "oyzbamwineofvf", - "zjknyuxg", - "lz", - "mrdixtreki", - "ttxpnrupza")))) - .withEnvironmentId("uttdiygbp") - .withEnvironmentVariables(mapOf("ctwwgzw", "swmtxk", "og", "jlmec")) - .withOutputs( - mapOf( - "zaifghtmoqqtlff", - new JobOutput().withDescription("vne"), - "avfqnvhnqoewdogi", - new JobOutput().withDescription("bkrkjj"), - "t", - new JobOutput().withDescription("tesypvidbztjh"), - "p", - new JobOutput().withDescription("ovnynkbwetnju"))) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(339434421) - .withInstanceType("nur") - .withProperties( - mapOf( - "ecmslclbl", - "datamghihp", - "bsjuscvsfx", - "datajxl", - "cydrtceukdqkk", - "datagctmgxuupbezq", - "chillcecf", - "dataihztgeqmgqzgwldo")) - .withDockerArgs("kzyaup") - .withShmSize("ccxnafbwqroohtuo")) - .withTaskDetails( - new AutoMLVertical() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("aoaguhicqlli") - .withTrainingData( - new MLTableJobInput() - .withDescription("vhrweftkwqejpmv") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("ac"))); - model = BinaryData.fromObject(model).toObject(AutoMLJob.class); - Assertions.assertEquals("lxhrp", model.description()); - Assertions.assertEquals("mblcouqehbhbcds", model.properties().get("iryr")); - Assertions.assertEquals("nadzyq", model.tags().get("gxyivpinbmh")); - Assertions.assertEquals("ehaepwamcxtc", model.componentId()); - Assertions.assertEquals("upeuknijduyye", model.computeId()); - Assertions.assertEquals("ydjfb", model.displayName()); - Assertions.assertEquals("yv", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("wikdmh", model.services().get("xjcmmzrrsc").endpoint()); - Assertions.assertEquals("uacdixmxuf", model.services().get("xjcmmzrrsc").jobServiceType()); - Assertions.assertEquals(2084049172, model.services().get("xjcmmzrrsc").port()); - Assertions.assertEquals("qg", model.services().get("xjcmmzrrsc").properties().get("kfnozoeoqbvj")); - Assertions.assertEquals("uttdiygbp", model.environmentId()); - Assertions.assertEquals("swmtxk", model.environmentVariables().get("ctwwgzw")); - Assertions.assertEquals("vne", model.outputs().get("zaifghtmoqqtlff").description()); - Assertions.assertEquals(339434421, model.resources().instanceCount()); - Assertions.assertEquals("nur", model.resources().instanceType()); - Assertions.assertEquals("kzyaup", model.resources().dockerArgs()); - Assertions.assertEquals("ccxnafbwqroohtuo", model.resources().shmSize()); - Assertions.assertEquals(LogVerbosity.DEBUG, model.taskDetails().logVerbosity()); - Assertions.assertEquals("aoaguhicqlli", model.taskDetails().targetColumnName()); - Assertions.assertEquals("vhrweftkwqejpmv", model.taskDetails().trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("ac", model.taskDetails().trainingData().uri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java deleted file mode 100644 index 8d3ae3ca9647c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLVertical model = - BinaryData - .fromString( - "{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Critical\",\"targetColumnName\":\"eocnhzqrottj\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"yjzp\",\"description\":\"rl\"}}") - .toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("eocnhzqrottj", model.targetColumnName()); - Assertions.assertEquals("rl", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("yjzp", model.trainingData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLVertical model = - new AutoMLVertical() - .withLogVerbosity(LogVerbosity.CRITICAL) - .withTargetColumnName("eocnhzqrottj") - .withTrainingData( - new MLTableJobInput().withDescription("rl").withMode(InputDeliveryMode.DOWNLOAD).withUri("yjzp")); - model = BinaryData.fromObject(model).toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("eocnhzqrottj", model.targetColumnName()); - Assertions.assertEquals("rl", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("yjzp", model.trainingData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java deleted file mode 100644 index 58b47b826dc68..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations; - -public final class AutoNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoNCrossValidations model = - BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoNCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoNCrossValidations model = new AutoNCrossValidations(); - model = BinaryData.fromObject(model).toObject(AutoNCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java deleted file mode 100644 index f12d789871f5b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoPausePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoPauseProperties model = - BinaryData - .fromString("{\"delayInMinutes\":1505052289,\"enabled\":true}") - .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1505052289, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1505052289).withEnabled(true); - model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1505052289, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java deleted file mode 100644 index c895c8da10433..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoScalePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoScaleProperties model = - BinaryData - .fromString("{\"minNodeCount\":814110880,\"enabled\":true,\"maxNodeCount\":1557135644}") - .toObject(AutoScaleProperties.class); - Assertions.assertEquals(814110880, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1557135644, model.maxNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoScaleProperties model = - new AutoScaleProperties().withMinNodeCount(814110880).withEnabled(true).withMaxNodeCount(1557135644); - model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(814110880, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1557135644, model.maxNodeCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java deleted file mode 100644 index e0e0e8665c433..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoSeasonality; - -public final class AutoSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoSeasonality model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoSeasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoSeasonality model = new AutoSeasonality(); - model = BinaryData.fromObject(model).toObject(AutoSeasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java deleted file mode 100644 index 127caf51febf1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetLags; - -public final class AutoTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetLags model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetLags model = new AutoTargetLags(); - model = BinaryData.fromObject(model).toObject(AutoTargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java deleted file mode 100644 index 14db2d76c61f0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize; - -public final class AutoTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetRollingWindowSize model = - BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetRollingWindowSize model = new AutoTargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(AutoTargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java deleted file mode 100644 index e2609437faf5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BanditPolicy; -import org.junit.jupiter.api.Assertions; - -public final class BanditPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BanditPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"Bandit\",\"slackAmount\":59.648163,\"slackFactor\":43.063473,\"delayEvaluation\":364097944,\"evaluationInterval\":2114496472}") - .toObject(BanditPolicy.class); - Assertions.assertEquals(364097944, model.delayEvaluation()); - Assertions.assertEquals(2114496472, model.evaluationInterval()); - Assertions.assertEquals(59.648163F, model.slackAmount()); - Assertions.assertEquals(43.063473F, model.slackFactor()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BanditPolicy model = - new BanditPolicy() - .withDelayEvaluation(364097944) - .withEvaluationInterval(2114496472) - .withSlackAmount(59.648163F) - .withSlackFactor(43.063473F); - model = BinaryData.fromObject(model).toObject(BanditPolicy.class); - Assertions.assertEquals(364097944, model.delayEvaluation()); - Assertions.assertEquals(2114496472, model.evaluationInterval()); - Assertions.assertEquals(59.648163F, model.slackAmount()); - Assertions.assertEquals(43.063473F, model.slackFactor()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index d9c91dc82e167..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,221 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchDeploymentTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchDeploymentTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"byuqerpqlp\",\"value\":[{\"identity\":{\"principalId\":\"439e0872-7c89-4299-a31c-cf73792200da\",\"tenantId\":\"50121c3a-c7ab-40c4-8c70-18840ec211b8\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"dbutauvfbtkuwhh\",\"properties\":{\"compute\":\"ykojoxafnndlpic\",\"errorThreshold\":171305753,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":1638328793,\"miniBatchSize\":8200965629156318432,\"outputAction\":\"AppendRow\",\"outputFileName\":\"pwdreqnovvqf\",\"provisioningState\":\"Failed\",\"description\":\"suwsyrsnds\",\"environmentId\":\"g\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"r\",\"tier\":\"Standard\",\"size\":\"neqn\",\"family\":\"rrwlquuijfqkace\",\"capacity\":2104888829},\"location\":\"fpubjibwwi\",\"tags\":{\"ynfs\":\"hqkvpuvksgplsak\",\"jphuopxodlqi\":\"n\",\"slyzrpzbchckqq\":\"ntorzihleosjswsr\",\"suiizynkedyat\":\"qioxi\"},\"id\":\"wyhqmibzyhwits\",\"name\":\"ypyynpcdpumnzg\",\"type\":\"wznm\"},{\"identity\":{\"principalId\":\"466a0824-8e60-480f-8923-8af40473b79f\",\"tenantId\":\"77aada0f-7267-4cb3-94d7-d6d969aaa174\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"rgjhxb\",\"properties\":{\"compute\":\"tlwwrlk\",\"errorThreshold\":1940246801,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":333571047,\"miniBatchSize\":4567104725520033936,\"outputAction\":\"SummaryOnly\",\"outputFileName\":\"yhgsy\",\"provisioningState\":\"Deleting\",\"description\":\"dtbnnha\",\"environmentId\":\"ocrkvcikh\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"mqg\",\"tier\":\"Basic\",\"size\":\"ezikywggxkal\",\"family\":\"tmelw\",\"capacity\":908050565},\"location\":\"ccjzkzivgvv\",\"tags\":{\"hyrnxxmu\":\"y\",\"v\":\"edndr\"},\"id\":\"tkwqqtchealm\",\"name\":\"mtdaa\",\"type\":\"gdv\"},{\"identity\":{\"principalId\":\"b3def810-702e-4b60-ab84-3e75ff2656f0\",\"tenantId\":\"241d1b0c-4837-448d-a75d-493d5be4541e\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"g\",\"properties\":{\"compute\":\"rtfudxepxg\",\"errorThreshold\":682770513,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":1825902686,\"miniBatchSize\":4744038705838577883,\"outputAction\":\"AppendRow\",\"outputFileName\":\"himdbl\",\"provisioningState\":\"Deleting\",\"description\":\"jhfjxwm\",\"environmentId\":\"kkfoqr\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"zi\",\"tier\":\"Basic\",\"size\":\"wneaiv\",\"family\":\"czelpcirel\",\"capacity\":561356651},\"location\":\"enwabfatk\",\"tags\":{\"oulpjrv\":\"xbjhwuaanozjosph\",\"rvimjwosytxitcsk\":\"ag\",\"hlyfjhdgqgg\":\"cktqumiekkezzi\",\"qfatpxllrxcyjm\":\"bdunygaeqid\"},\"id\":\"a\",\"name\":\"su\",\"type\":\"arm\"},{\"identity\":{\"principalId\":\"ecb5ec81-5f09-4997-928a-d4e055e4403a\",\"tenantId\":\"e364d12b-cbeb-400a-949f-4056df2528ce\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"q\",\"properties\":{\"compute\":\"hhyxxrw\",\"errorThreshold\":324291601,\"loggingLevel\":\"Info\",\"maxConcurrencyPerInstance\":381030924,\"miniBatchSize\":4370015191993628840,\"outputAction\":\"AppendRow\",\"outputFileName\":\"areqna\",\"provisioningState\":\"Succeeded\",\"description\":\"ky\",\"environmentId\":\"beddgssofw\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"alkrmn\",\"tier\":\"Basic\",\"size\":\"xacqqudfnbyx\",\"family\":\"aabjyvayffimrz\",\"capacity\":1007625802},\"location\":\"qogsexnevfd\",\"tags\":{\"euzsoi\":\"wmewzsyy\"},\"id\":\"judpfrxt\",\"name\":\"thzvaytdwkqbrqu\",\"type\":\"paxh\"}]}") - .toObject(BatchDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("byuqerpqlp", model.nextLink()); - Assertions.assertEquals("fpubjibwwi", model.value().get(0).location()); - Assertions.assertEquals("hqkvpuvksgplsak", model.value().get(0).tags().get("ynfs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).kind()); - Assertions.assertEquals("suwsyrsnds", model.value().get(0).properties().description()); - Assertions.assertEquals("g", model.value().get(0).properties().environmentId()); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).properties().compute()); - Assertions.assertEquals(171305753, model.value().get(0).properties().errorThreshold()); - Assertions.assertEquals(BatchLoggingLevel.WARNING, model.value().get(0).properties().loggingLevel()); - Assertions.assertEquals(1638328793, model.value().get(0).properties().maxConcurrencyPerInstance()); - Assertions.assertEquals(8200965629156318432L, model.value().get(0).properties().miniBatchSize()); - Assertions.assertEquals(BatchOutputAction.APPEND_ROW, model.value().get(0).properties().outputAction()); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).properties().outputFileName()); - Assertions.assertEquals("r", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("neqn", model.value().get(0).sku().size()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).sku().family()); - Assertions.assertEquals(2104888829, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchDeploymentTrackedResourceArmPaginatedResult model = - new BatchDeploymentTrackedResourceArmPaginatedResult() - .withNextLink("byuqerpqlp") - .withValue( - Arrays - .asList( - new BatchDeploymentInner() - .withLocation("fpubjibwwi") - .withTags( - mapOf( - "ynfs", - "hqkvpuvksgplsak", - "jphuopxodlqi", - "n", - "slyzrpzbchckqq", - "ntorzihleosjswsr", - "suiizynkedyat", - "qioxi")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("dbutauvfbtkuwhh") - .withProperties( - new BatchDeploymentProperties() - .withDescription("suwsyrsnds") - .withEnvironmentId("g") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("ykojoxafnndlpic") - .withErrorThreshold(171305753) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(1638328793) - .withMiniBatchSize(8200965629156318432L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("pwdreqnovvqf")) - .withSku( - new Sku() - .withName("r") - .withTier(SkuTier.STANDARD) - .withSize("neqn") - .withFamily("rrwlquuijfqkace") - .withCapacity(2104888829)), - new BatchDeploymentInner() - .withLocation("ccjzkzivgvv") - .withTags(mapOf("hyrnxxmu", "y", "v", "edndr")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("rgjhxb") - .withProperties( - new BatchDeploymentProperties() - .withDescription("dtbnnha") - .withEnvironmentId("ocrkvcikh") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("tlwwrlk") - .withErrorThreshold(1940246801) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(333571047) - .withMiniBatchSize(4567104725520033936L) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("yhgsy")) - .withSku( - new Sku() - .withName("mqg") - .withTier(SkuTier.BASIC) - .withSize("ezikywggxkal") - .withFamily("tmelw") - .withCapacity(908050565)), - new BatchDeploymentInner() - .withLocation("enwabfatk") - .withTags( - mapOf( - "oulpjrv", - "xbjhwuaanozjosph", - "rvimjwosytxitcsk", - "ag", - "hlyfjhdgqgg", - "cktqumiekkezzi", - "qfatpxllrxcyjm", - "bdunygaeqid")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("g") - .withProperties( - new BatchDeploymentProperties() - .withDescription("jhfjxwm") - .withEnvironmentId("kkfoqr") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("rtfudxepxg") - .withErrorThreshold(682770513) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(1825902686) - .withMiniBatchSize(4744038705838577883L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("himdbl")) - .withSku( - new Sku() - .withName("zi") - .withTier(SkuTier.BASIC) - .withSize("wneaiv") - .withFamily("czelpcirel") - .withCapacity(561356651)), - new BatchDeploymentInner() - .withLocation("qogsexnevfd") - .withTags(mapOf("euzsoi", "wmewzsyy")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("q") - .withProperties( - new BatchDeploymentProperties() - .withDescription("ky") - .withEnvironmentId("beddgssofw") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("hhyxxrw") - .withErrorThreshold(324291601) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(381030924) - .withMiniBatchSize(4370015191993628840L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("areqna")) - .withSku( - new Sku() - .withName("alkrmn") - .withTier(SkuTier.BASIC) - .withSize("xacqqudfnbyx") - .withFamily("aabjyvayffimrz") - .withCapacity(1007625802)))); - model = BinaryData.fromObject(model).toObject(BatchDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("byuqerpqlp", model.nextLink()); - Assertions.assertEquals("fpubjibwwi", model.value().get(0).location()); - Assertions.assertEquals("hqkvpuvksgplsak", model.value().get(0).tags().get("ynfs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).kind()); - Assertions.assertEquals("suwsyrsnds", model.value().get(0).properties().description()); - Assertions.assertEquals("g", model.value().get(0).properties().environmentId()); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).properties().compute()); - Assertions.assertEquals(171305753, model.value().get(0).properties().errorThreshold()); - Assertions.assertEquals(BatchLoggingLevel.WARNING, model.value().get(0).properties().loggingLevel()); - Assertions.assertEquals(1638328793, model.value().get(0).properties().maxConcurrencyPerInstance()); - Assertions.assertEquals(8200965629156318432L, model.value().get(0).properties().miniBatchSize()); - Assertions.assertEquals(BatchOutputAction.APPEND_ROW, model.value().get(0).properties().outputAction()); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).properties().outputFileName()); - Assertions.assertEquals("r", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("neqn", model.value().get(0).sku().size()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).sku().family()); - Assertions.assertEquals(2104888829, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java deleted file mode 100644 index 4a747598b2ef1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 BatchDeploymentsDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .batchDeployments() - .delete("ujdsooxrqwo", "urbti", "apdyarikeejdpdfh", "wmmkfq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java deleted file mode 100644 index 46d3c75933860..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import org.junit.jupiter.api.Assertions; - -public final class BatchEndpointDefaultsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchEndpointDefaults model = - BinaryData.fromString("{\"deploymentName\":\"wsbpfvm\"}").toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("wsbpfvm", model.deploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("wsbpfvm"); - model = BinaryData.fromObject(model).toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("wsbpfvm", model.deploymentName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index f8fc66942d42b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,96 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchEndpointTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"gcj\",\"value\":[{\"identity\":{\"principalId\":\"f81557b3-3455-43a9-863a-877ebc9a8614\",\"tenantId\":\"ca2f438e-dabf-4a7a-808b-9b35946ac806\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"ttdumorppxebmnzb\",\"properties\":{\"provisioningState\":\"Canceled\",\"authMode\":\"Key\",\"description\":\"lkfg\",\"properties\":{},\"scoringUri\":\"euel\",\"swaggerUri\":\"hsd\"},\"sku\":{\"name\":\"t\",\"tier\":\"Standard\",\"size\":\"kd\",\"family\":\"wq\",\"capacity\":180318621},\"location\":\"zx\",\"tags\":{\"sg\":\"ithhqzon\",\"c\":\"b\"},\"id\":\"hfwdsjnkaljutiis\",\"name\":\"acffgdkzzewkfvhq\",\"type\":\"railvpnppfuf\"}]}") - .toObject(BatchEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("gcj", model.nextLink()); - Assertions.assertEquals("zx", model.value().get(0).location()); - Assertions.assertEquals("ithhqzon", model.value().get(0).tags().get("sg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ttdumorppxebmnzb", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals("lkfg", model.value().get(0).properties().description()); - Assertions.assertEquals("t", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("kd", model.value().get(0).sku().size()); - Assertions.assertEquals("wq", model.value().get(0).sku().family()); - Assertions.assertEquals(180318621, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointTrackedResourceArmPaginatedResult model = - new BatchEndpointTrackedResourceArmPaginatedResult() - .withNextLink("gcj") - .withValue( - Arrays - .asList( - new BatchEndpointInner() - .withLocation("zx") - .withTags(mapOf("sg", "ithhqzon", "c", "b")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("ttdumorppxebmnzb") - .withProperties( - new BatchEndpointProperties() - .withAuthMode(EndpointAuthMode.KEY) - .withDescription("lkfg") - .withProperties(mapOf())) - .withSku( - new Sku() - .withName("t") - .withTier(SkuTier.STANDARD) - .withSize("kd") - .withFamily("wq") - .withCapacity(180318621)))); - model = BinaryData.fromObject(model).toObject(BatchEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("gcj", model.nextLink()); - Assertions.assertEquals("zx", model.value().get(0).location()); - Assertions.assertEquals("ithhqzon", model.value().get(0).tags().get("sg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ttdumorppxebmnzb", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals("lkfg", model.value().get(0).properties().description()); - Assertions.assertEquals("t", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("kd", model.value().get(0).sku().size()); - Assertions.assertEquals("wq", model.value().get(0).sku().family()); - Assertions.assertEquals(180318621, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java deleted file mode 100644 index 6497981344837..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 BatchEndpointsDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchEndpoints().delete("pm", "rdlhvdvmiphbe", "eqjzm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java deleted file mode 100644 index 5828f1ca72ec1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchRetrySettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class BatchRetrySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchRetrySettings model = - BinaryData - .fromString("{\"maxRetries\":80770684,\"timeout\":\"PT155H21M58S\"}") - .toObject(BatchRetrySettings.class); - Assertions.assertEquals(80770684, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT155H21M58S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchRetrySettings model = - new BatchRetrySettings().withMaxRetries(80770684).withTimeout(Duration.parse("PT155H21M58S")); - model = BinaryData.fromObject(model).toObject(BatchRetrySettings.class); - Assertions.assertEquals(80770684, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT155H21M58S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java deleted file mode 100644 index eff5b3a84ec34..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm; - -public final class BayesianSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BayesianSamplingAlgorithm model = - BinaryData.fromString("{\"samplingAlgorithmType\":\"Bayesian\"}").toObject(BayesianSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BayesianSamplingAlgorithm model = new BayesianSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(BayesianSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java deleted file mode 100644 index f45e52a1aad6a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import org.junit.jupiter.api.Assertions; - -public final class BuildContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildContext model = - BinaryData - .fromString("{\"contextUri\":\"mfpjbabw\",\"dockerfilePath\":\"fcxsspuunnoxy\"}") - .toObject(BuildContext.class); - Assertions.assertEquals("mfpjbabw", model.contextUri()); - Assertions.assertEquals("fcxsspuunnoxy", model.dockerfilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildContext model = new BuildContext().withContextUri("mfpjbabw").withDockerfilePath("fcxsspuunnoxy"); - model = BinaryData.fromObject(model).toObject(BuildContext.class); - Assertions.assertEquals("mfpjbabw", model.contextUri()); - Assertions.assertEquals("fcxsspuunnoxy", model.dockerfilePath()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java deleted file mode 100644 index 54361a6a37d24..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.Classification; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Classification model = - BinaryData - .fromString( - "{\"taskType\":\"Classification\",\"positiveLabel\":\"z\",\"primaryMetric\":\"Accuracy\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"BernoulliNaiveBayes\",\"KNN\",\"LogisticRegression\",\"DecisionTree\"],\"blockedTrainingAlgorithms\":[\"SGD\",\"LightGBM\",\"SVM\"],\"enableDnnTraining\":true,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT239H29M50S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"dataclvdjjukyrdnqod\",\"stackMetaLearnerTrainPercentage\":30.06941234013376,\"stackMetaLearnerType\":\"LightGBMClassifier\"}},\"cvSplitColumnNames\":[\"aqnvzoqgyipemchg\",\"v\"],\"featurizationSettings\":{\"blockedTransformers\":[\"WoETargetEncoder\",\"WordEmbedding\",\"LabelEncoder\"],\"columnNameAndTypes\":{\"iuh\":\"ptlghwzhomewjjst\",\"ia\":\"awmo\",\"vodrrslblxydkxr\":\"cz\"},\"enableDnnFeaturization\":true,\"mode\":\"Off\",\"transformerParams\":{\"g\":[],\"qljnqkhychoco\":[],\"lehu\":[]},\"datasetLanguage\":\"lrqff\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":50.27087572372039,\"maxConcurrentTrials\":450328402,\"maxCoresPerTrial\":1075829949,\"maxTrials\":662993818,\"timeout\":\"PT194H12M11S\",\"trialTimeout\":\"PT236H50M57S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"rxmrgchbapx\",\"description\":\"y\"},\"testDataSize\":1.7164995710023723,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"buscgduus\",\"description\":\"ycblevpmcl\"},\"validationDataSize\":38.79068857320828,\"weightColumnName\":\"yxlzgs\",\"logVerbosity\":\"Info\",\"targetColumnName\":\"zltafhbzffovwm\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"zqs\",\"description\":\"pgvdwnapfdqw\"}}") - .toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.INFO, model.logVerbosity()); - Assertions.assertEquals("zltafhbzffovwm", model.targetColumnName()); - Assertions.assertEquals("pgvdwnapfdqw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zqs", model.trainingData().uri()); - Assertions.assertEquals("z", model.positiveLabel()); - Assertions.assertEquals(ClassificationPrimaryMetrics.ACCURACY, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions - .assertEquals(Duration.parse("PT239H29M50S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 30.06941234013376D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("aqnvzoqgyipemchg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("lrqff", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WO_ETARGET_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ptlghwzhomewjjst", model.featurizationSettings().columnNameAndTypes().get("iuh")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.OFF, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(50.27087572372039D, model.limitSettings().exitScore()); - Assertions.assertEquals(450328402, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1075829949, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(662993818, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT194H12M11S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT236H50M57S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("y", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.testData().mode()); - Assertions.assertEquals("rxmrgchbapx", model.testData().uri()); - Assertions.assertEquals(1.7164995710023723D, model.testDataSize()); - Assertions.assertEquals("ycblevpmcl", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("buscgduus", model.validationData().uri()); - Assertions.assertEquals(38.79068857320828D, model.validationDataSize()); - Assertions.assertEquals("yxlzgs", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Classification model = - new Classification() - .withLogVerbosity(LogVerbosity.INFO) - .withTargetColumnName("zltafhbzffovwm") - .withTrainingData( - new MLTableJobInput() - .withDescription("pgvdwnapfdqw") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("zqs")) - .withPositiveLabel("z") - .withPrimaryMetric(ClassificationPrimaryMetrics.ACCURACY) - .withTrainingSettings( - new ClassificationTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(true) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT239H29M50S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("dataclvdjjukyrdnqod") - .withStackMetaLearnerTrainPercentage(30.06941234013376D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER)) - .withAllowedTrainingAlgorithms( - Arrays - .asList( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - ClassificationModels.KNN, - ClassificationModels.LOGISTIC_REGRESSION, - ClassificationModels.DECISION_TREE)) - .withBlockedTrainingAlgorithms( - Arrays - .asList( - ClassificationModels.SGD, - ClassificationModels.LIGHT_GBM, - ClassificationModels.SVM))) - .withCvSplitColumnNames(Arrays.asList("aqnvzoqgyipemchg", "v")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("lrqff") - .withBlockedTransformers( - Arrays - .asList( - BlockedTransformers.WO_ETARGET_ENCODER, - BlockedTransformers.WORD_EMBEDDING, - BlockedTransformers.LABEL_ENCODER)) - .withColumnNameAndTypes(mapOf("iuh", "ptlghwzhomewjjst", "ia", "awmo", "vodrrslblxydkxr", "cz")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.OFF) - .withTransformerParams( - mapOf("g", Arrays.asList(), "qljnqkhychoco", Arrays.asList(), "lehu", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(50.27087572372039D) - .withMaxConcurrentTrials(450328402) - .withMaxCoresPerTrial(1075829949) - .withMaxTrials(662993818) - .withTimeout(Duration.parse("PT194H12M11S")) - .withTrialTimeout(Duration.parse("PT236H50M57S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("y") - .withMode(InputDeliveryMode.DIRECT) - .withUri("rxmrgchbapx")) - .withTestDataSize(1.7164995710023723D) - .withValidationData( - new MLTableJobInput() - .withDescription("ycblevpmcl") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("buscgduus")) - .withValidationDataSize(38.79068857320828D) - .withWeightColumnName("yxlzgs"); - model = BinaryData.fromObject(model).toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.INFO, model.logVerbosity()); - Assertions.assertEquals("zltafhbzffovwm", model.targetColumnName()); - Assertions.assertEquals("pgvdwnapfdqw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zqs", model.trainingData().uri()); - Assertions.assertEquals("z", model.positiveLabel()); - Assertions.assertEquals(ClassificationPrimaryMetrics.ACCURACY, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions - .assertEquals(Duration.parse("PT239H29M50S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 30.06941234013376D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("aqnvzoqgyipemchg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("lrqff", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WO_ETARGET_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ptlghwzhomewjjst", model.featurizationSettings().columnNameAndTypes().get("iuh")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.OFF, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(50.27087572372039D, model.limitSettings().exitScore()); - Assertions.assertEquals(450328402, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1075829949, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(662993818, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT194H12M11S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT236H50M57S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("y", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.testData().mode()); - Assertions.assertEquals("rxmrgchbapx", model.testData().uri()); - Assertions.assertEquals(1.7164995710023723D, model.testDataSize()); - Assertions.assertEquals("ycblevpmcl", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("buscgduus", model.validationData().uri()); - Assertions.assertEquals(38.79068857320828D, model.validationDataSize()); - Assertions.assertEquals("yxlzgs", model.weightColumnName()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java deleted file mode 100644 index 4cc81b1ca45ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java +++ /dev/null @@ -1,69 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClassificationTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"LinearSVM\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"LogisticRegression\"],\"enableDnnTraining\":false,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT171H27M12S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"dataeseyqr\",\"stackMetaLearnerTrainPercentage\":0.8015922020078059,\"stackMetaLearnerType\":\"LightGBMClassifier\"}}") - .toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT171H27M12S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(0.8015922020078059D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ClassificationModels.LINEAR_SVM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.LOGISTIC_REGRESSION, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClassificationTrainingSettings model = - new ClassificationTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(true) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT171H27M12S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("dataeseyqr") - .withStackMetaLearnerTrainPercentage(0.8015922020078059D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER)) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.LINEAR_SVM, ClassificationModels.KNN)) - .withBlockedTrainingAlgorithms(Arrays.asList(ClassificationModels.LOGISTIC_REGRESSION)); - model = BinaryData.fromObject(model).toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT171H27M12S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(0.8015922020078059D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ClassificationModels.LINEAR_SVM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.LOGISTIC_REGRESSION, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java deleted file mode 100644 index 34fb2ad4a38d5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java +++ /dev/null @@ -1,23 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; - -public final class ClusterUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateParameters model = - BinaryData.fromString("{\"properties\":{\"properties\":{}}}").toObject(ClusterUpdateParameters.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateParameters model = new ClusterUpdateParameters().withProperties(new ScaleSettingsInformation()); - model = BinaryData.fromObject(model).toObject(ClusterUpdateParameters.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java deleted file mode 100644 index af927978ddd64..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java +++ /dev/null @@ -1,47 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateProperties model = - BinaryData - .fromString( - "{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":735455048,\"minNodeCount\":1281560612,\"nodeIdleTimeBeforeScaleDown\":\"PT89H36M53S\"}}}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(735455048, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(1281560612, model.properties().scaleSettings().minNodeCount()); - Assertions - .assertEquals( - Duration.parse("PT89H36M53S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateProperties model = - new ClusterUpdateProperties() - .withProperties( - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(735455048) - .withMinNodeCount(1281560612) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT89H36M53S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(735455048, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(1281560612, model.properties().scaleSettings().minNodeCount()); - Assertions - .assertEquals( - Duration.parse("PT89H36M53S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java deleted file mode 100644 index 45ffe83779de7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java +++ /dev/null @@ -1,64 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"zbhd\",\"nextVersion\":\"mlmz\",\"description\":\"oftrmaequia\",\"properties\":{\"nswhcc\":\"cslfaoqzpiyylha\",\"aivwitqscywu\":\"ph\"},\"tags\":{\"i\":\"oluhczbwemh\",\"wmsweypqwd\":\"sbrgz\",\"mkttlstvlzywem\":\"ggicccnxqhue\",\"lusiy\":\"zrncsdt\"}},\"id\":\"sfgytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}") - .toObject(CodeContainerInner.class); - Assertions.assertEquals("oftrmaequia", model.properties().description()); - Assertions.assertEquals("cslfaoqzpiyylha", model.properties().properties().get("nswhcc")); - Assertions.assertEquals("oluhczbwemh", model.properties().tags().get("i")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerInner model = - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("oftrmaequia") - .withProperties(mapOf("nswhcc", "cslfaoqzpiyylha", "aivwitqscywu", "ph")) - .withTags( - mapOf( - "i", - "oluhczbwemh", - "wmsweypqwd", - "sbrgz", - "mkttlstvlzywem", - "ggicccnxqhue", - "lusiy", - "zrncsdt")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(CodeContainerInner.class); - Assertions.assertEquals("oftrmaequia", model.properties().description()); - Assertions.assertEquals("cslfaoqzpiyylha", model.properties().properties().get("nswhcc")); - Assertions.assertEquals("oluhczbwemh", model.properties().tags().get("i")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java deleted file mode 100644 index 18c6c8a71c1b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":true,\"latestVersion\":\"p\",\"nextVersion\":\"ksrpqv\",\"description\":\"zraehtwd\",\"properties\":{\"cdl\":\"tswiby\",\"hfwpracstwit\":\"h\",\"nmdyodnwzxl\":\"khevxccedc\",\"nhltiugcxn\":\"jc\"},\"tags\":{\"nyowxwlmdjrkvfg\":\"wxqibyq\",\"j\":\"vfvpdbodaciz\",\"hvxndzwmkrefajpj\":\"lhkrribdeibqipqk\"}}") - .toObject(CodeContainerProperties.class); - Assertions.assertEquals("zraehtwd", model.description()); - Assertions.assertEquals("tswiby", model.properties().get("cdl")); - Assertions.assertEquals("wxqibyq", model.tags().get("nyowxwlmdjrkvfg")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerProperties model = - new CodeContainerProperties() - .withDescription("zraehtwd") - .withProperties( - mapOf("cdl", "tswiby", "hfwpracstwit", "h", "nmdyodnwzxl", "khevxccedc", "nhltiugcxn", "jc")) - .withTags( - mapOf("nyowxwlmdjrkvfg", "wxqibyq", "j", "vfvpdbodaciz", "hvxndzwmkrefajpj", "lhkrribdeibqipqk")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(CodeContainerProperties.class); - Assertions.assertEquals("zraehtwd", model.description()); - Assertions.assertEquals("tswiby", model.properties().get("cdl")); - Assertions.assertEquals("wxqibyq", model.tags().get("nyowxwlmdjrkvfg")); - Assertions.assertEquals(true, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 3178496ff08ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"kojvd\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"ouicybxarzgszu\",\"nextVersion\":\"x\",\"description\":\"q\",\"properties\":{},\"tags\":{}},\"id\":\"oamciodh\",\"name\":\"haz\",\"type\":\"khnzbonlw\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"gokdwbwhks\",\"nextVersion\":\"cmrvexzt\",\"description\":\"t\",\"properties\":{},\"tags\":{}},\"id\":\"ra\",\"name\":\"yzkoowtlmngu\",\"type\":\"aw\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"syuuximerq\",\"nextVersion\":\"bw\",\"description\":\"nkbykutwpfhp\",\"properties\":{},\"tags\":{}},\"id\":\"r\",\"name\":\"kdsnfdsdoakgtdl\",\"type\":\"kkze\"},{\"properties\":{\"isArchived\":false,\"latestVersion\":\"ewpusdsttwvogvb\",\"nextVersion\":\"jdcngqqm\",\"description\":\"kufgmj\",\"properties\":{},\"tags\":{}},\"id\":\"dgrtwaenuuzkopbm\",\"name\":\"nrfdw\",\"type\":\"yuhhziu\"}]}") - .toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("kojvd", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerResourceArmPaginatedResult model = - new CodeContainerResourceArmPaginatedResult() - .withNextLink("kojvd") - .withValue( - Arrays - .asList( - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("q") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("t") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("nkbykutwpfhp") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("kufgmj") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false)))); - model = BinaryData.fromObject(model).toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("kojvd", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2d055797b46df..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,103 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -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 CodeContainersCreateOrUpdateWithResponseMockTests { - @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\":{\"isArchived\":true,\"latestVersion\":\"bwfwhxorpwaltzwu\",\"nextVersion\":\"xojfcc\",\"description\":\"h\",\"properties\":{\"xcdrzprobzzxezm\":\"thvazjpw\",\"jeuxsphlo\":\"rkjg\",\"ufvcgnrgl\":\"fpmijpdvzvfbhwbd\"},\"tags\":{\"ebzx\":\"wyambhba\",\"qutibhl\":\"k\",\"bduxvzmlghnys\":\"nntrvrkps\",\"kppdi\":\"lpyeu\"}},\"id\":\"bo\",\"name\":\"xvhhyqq\",\"type\":\"gatxgrznmginmtsd\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = - manager - .codeContainers() - .define("xyauxre") - .withExistingWorkspace("wrswyiljp", "bkgx") - .withProperties( - new CodeContainerProperties() - .withDescription("gpwb") - .withProperties(mapOf("li", "ri")) - .withTags( - mapOf( - "bibticuhqvum", - "cgnwplrrbphcts", - "eqbbewfcuqfpy", - "pbfs", - "eyyjshcybwfuppox", - "xmzrmtmvwitu", - "iikmoxrezsvavlrx", - "rcmvouujx")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("h", response.properties().description()); - Assertions.assertEquals("thvazjpw", response.properties().properties().get("xcdrzprobzzxezm")); - Assertions.assertEquals("wyambhba", response.properties().tags().get("ebzx")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 7a8d44abb0028..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 CodeContainersDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .codeContainers() - .deleteWithResponse("hkigglclwalhvub", "gzphetxd", "cmyc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java deleted file mode 100644 index 3efd57df3af43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -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 CodeContainersGetWithResponseMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"x\",\"nextVersion\":\"fpzvoikvntwczf\",\"description\":\"ushlcxpblalh\",\"properties\":{\"kissaidqzsaa\":\"p\",\"fiafc\":\"qdsgptotxj\"},\"tags\":{\"cao\":\"tbfijz\"}},\"id\":\"olbuauktwieope\",\"name\":\"e\",\"type\":\"xq\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = - manager - .codeContainers() - .getWithResponse("ajqzj", "alec", "bibiwks", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ushlcxpblalh", response.properties().description()); - Assertions.assertEquals("p", response.properties().properties().get("kissaidqzsaa")); - Assertions.assertEquals("tbfijz", response.properties().tags().get("cao")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java deleted file mode 100644 index 303e81d6000f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java +++ /dev/null @@ -1,71 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -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 CodeContainersListMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"mazdfsqxh\",\"nextVersion\":\"mrejparnpvgr\",\"description\":\"rbwtdrcwgzwl\",\"properties\":{\"acfculzjrmhpf\":\"lhhfi\",\"xsoxi\":\"wvyldqpzf\"},\"tags\":{\"qqt\":\"jlzkdrocqsxy\"}},\"id\":\"iwdwisvnmeylajam\",\"name\":\"ajyhftpzc\",\"type\":\"ryklleynqa\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.codeContainers().list("aluzyi", "fcvcewbwq", "dgsjsat", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rbwtdrcwgzwl", response.iterator().next().properties().description()); - Assertions.assertEquals("lhhfi", response.iterator().next().properties().properties().get("acfculzjrmhpf")); - Assertions.assertEquals("jlzkdrocqsxy", response.iterator().next().properties().tags().get("qqt")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 9cdca2627d869..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 CodeVersionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .codeVersions() - .deleteWithResponse("j", "xowkdnj", "xgkrh", "iehycpnowawonoe", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java deleted file mode 100644 index fc0822215bd47..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ColumnTransformerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ColumnTransformer model = - BinaryData - .fromString("{\"fields\":[\"dsmjtgr\",\"gdgkki\"],\"parameters\":\"dataplkcsm\"}") - .toObject(ColumnTransformer.class); - Assertions.assertEquals("dsmjtgr", model.fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ColumnTransformer model = - new ColumnTransformer().withFields(Arrays.asList("dsmjtgr", "gdgkki")).withParameters("dataplkcsm"); - model = BinaryData.fromObject(model).toObject(ColumnTransformer.class); - Assertions.assertEquals("dsmjtgr", model.fields().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java deleted file mode 100644 index b51a96cea3340..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class CommandJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommandJobLimits model = - BinaryData - .fromString("{\"jobLimitsType\":\"Command\",\"timeout\":\"PT130H21M4S\"}") - .toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT130H21M4S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT130H21M4S")); - model = BinaryData.fromObject(model).toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT130H21M4S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java deleted file mode 100644 index 179ff3923e2cb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java +++ /dev/null @@ -1,55 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"snjvcdwxlpqekftn\",\"nextVersion\":\"tjsyin\",\"description\":\"fq\",\"properties\":{\"ikdgszywkbir\":\"tdhtmdvyp\"},\"tags\":{\"hkjoqr\":\"zh\",\"mfiibfggj\":\"qqaatjinrvgou\",\"rwxkvtkkgl\":\"ool\"}},\"id\":\"wjygvjayvblmhvk\",\"name\":\"uhbxvvy\",\"type\":\"gsopbyrqufegxu\"}") - .toObject(ComponentContainerInner.class); - Assertions.assertEquals("fq", model.properties().description()); - Assertions.assertEquals("tdhtmdvyp", model.properties().properties().get("ikdgszywkbir")); - Assertions.assertEquals("zh", model.properties().tags().get("hkjoqr")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerInner model = - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("fq") - .withProperties(mapOf("ikdgszywkbir", "tdhtmdvyp")) - .withTags(mapOf("hkjoqr", "zh", "mfiibfggj", "qqaatjinrvgou", "rwxkvtkkgl", "ool")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(ComponentContainerInner.class); - Assertions.assertEquals("fq", model.properties().description()); - Assertions.assertEquals("tdhtmdvyp", model.properties().properties().get("ikdgszywkbir")); - Assertions.assertEquals("zh", model.properties().tags().get("hkjoqr")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java deleted file mode 100644 index 7ac37197ded3a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"bnhlmc\",\"nextVersion\":\"p\",\"description\":\"gitvg\",\"properties\":{\"rh\":\"rixkwmyijejve\",\"xexccbdreaxhcexd\":\"pna\"},\"tags\":{\"yjsvfyc\":\"qahqkghtpwijn\",\"fvoow\":\"z\",\"pyostronzmyhgfi\":\"rvmtgjq\"}}") - .toObject(ComponentContainerProperties.class); - Assertions.assertEquals("gitvg", model.description()); - Assertions.assertEquals("rixkwmyijejve", model.properties().get("rh")); - Assertions.assertEquals("qahqkghtpwijn", model.tags().get("yjsvfyc")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerProperties model = - new ComponentContainerProperties() - .withDescription("gitvg") - .withProperties(mapOf("rh", "rixkwmyijejve", "xexccbdreaxhcexd", "pna")) - .withTags(mapOf("yjsvfyc", "qahqkghtpwijn", "fvoow", "z", "pyostronzmyhgfi", "rvmtgjq")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ComponentContainerProperties.class); - Assertions.assertEquals("gitvg", model.description()); - Assertions.assertEquals("rixkwmyijejve", model.properties().get("rh")); - Assertions.assertEquals("qahqkghtpwijn", model.tags().get("yjsvfyc")); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index e0932d12bdfa4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ho\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"phqamvdkfwynwcvt\",\"nextVersion\":\"kayh\",\"description\":\"nvyq\",\"properties\":{},\"tags\":{}},\"id\":\"zwpcnpwzcjaesg\",\"name\":\"v\",\"type\":\"ccyajg\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"wygzlvdnkfxusem\",\"nextVersion\":\"zrmuhapfcqdps\",\"description\":\"qvpsvuoymg\",\"properties\":{},\"tags\":{}},\"id\":\"vezrypqlmfeo\",\"name\":\"erqwkyhkobopg\",\"type\":\"edkowepbqpcrfk\"}]}") - .toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ho", model.nextLink()); - Assertions.assertEquals("nvyq", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model = - new ComponentContainerResourceArmPaginatedResult() - .withNextLink("ho") - .withValue( - Arrays - .asList( - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("nvyq") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("qvpsvuoymg") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)))); - model = BinaryData.fromObject(model).toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ho", model.nextLink()); - Assertions.assertEquals("nvyq", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index d358c3b29a3ce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -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 ComponentContainersCreateOrUpdateWithResponseMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"bpbokhmml\",\"nextVersion\":\"yarnggcjfwblqhxk\",\"description\":\"mcolmu\",\"properties\":{\"kluwz\":\"vaos\",\"nobguqisqsqkpdmi\":\"eygzvtyevjhu\",\"pnml\":\"y\"},\"tags\":{\"yrx\":\"cpszpmcvqdvrdmv\",\"mbtple\":\"hgvqojbxaotcgbz\"}},\"id\":\"ioyidoxznvg\",\"name\":\"dtmuuvd\",\"type\":\"wsxmrszb\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = - manager - .componentContainers() - .define("wrdtnagzlgpy") - .withExistingWorkspace("avqdorbccqcd", "thojvlirknucos") - .withProperties( - new ComponentContainerProperties() - .withDescription("urgmcdcp") - .withProperties(mapOf("hyaaknyukibxiglh", "lojermhzicsbfd")) - .withTags(mapOf("tozyagjjnxkb", "wxqtejpiilh", "yxg", "lh", "cnvqeons", "fklvqzrwtrdg")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("mcolmu", response.properties().description()); - Assertions.assertEquals("vaos", response.properties().properties().get("kluwz")); - Assertions.assertEquals("cpszpmcvqdvrdmv", response.properties().tags().get("yrx")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 6996fbb163cc9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 ComponentContainersDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .componentContainers() - .deleteWithResponse( - "tpuwnnohmmzngocf", "juypwyiulaynosu", "kfhaxttpfsmwgsgh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java deleted file mode 100644 index e4b1837836cc8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -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 ComponentContainersGetWithResponseMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"bzkuastaxklpr\",\"nextVersion\":\"l\",\"description\":\"l\",\"properties\":{\"yskye\":\"zwxvscksgf\",\"ckwrtw\":\"gafxczvf\"},\"tags\":{\"lhpdhwynctaczcnj\":\"yveszr\",\"x\":\"mbbfnv\",\"nkrtikl\":\"tzo\"}},\"id\":\"n\",\"name\":\"hql\",\"type\":\"oqksyiibhyxwbgbu\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = - manager - .componentContainers() - .getWithResponse("ucumlddauqml", "feothxu", "rigrjdljlkq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("l", response.properties().description()); - Assertions.assertEquals("zwxvscksgf", response.properties().properties().get("yskye")); - Assertions.assertEquals("yveszr", response.properties().tags().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java deleted file mode 100644 index 923a359e700ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java +++ /dev/null @@ -1,74 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 ComponentContainersListMockTests { - @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\":{\"isArchived\":true,\"latestVersion\":\"ncgagdvc\",\"nextVersion\":\"hftzbpyfao\",\"description\":\"f\",\"properties\":{\"rf\":\"ncwmhjob\",\"dc\":\"ri\",\"f\":\"h\",\"oorssatfy\":\"cvbzwgwhgkgsoa\"},\"tags\":{\"dqn\":\"ufdmxuq\",\"fqayopbtsix\":\"sttuxv\",\"jay\":\"gvbhxmndztgs\"}},\"id\":\"arxneibpgbr\",\"name\":\"bjdqkn\",\"type\":\"qnm\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .componentContainers() - .list("f", "uz", "wjecooyvhtuqbpe", ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("f", response.iterator().next().properties().description()); - Assertions.assertEquals("ncwmhjob", response.iterator().next().properties().properties().get("rf")); - Assertions.assertEquals("ufdmxuq", response.iterator().next().properties().tags().get("dqn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java deleted file mode 100644 index b66999b281017..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"componentSpec\":\"datarnjwmw\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"zejjoqk\",\"properties\":{\"azpxdtnkdmkqjjl\":\"hsxttaugzxnf\",\"ou\":\"uenvrkp\",\"aays\":\"ibreb\"},\"tags\":{\"tezlwff\":\"xqtnq\",\"pqqmted\":\"iakp\"}},\"id\":\"mmji\",\"name\":\"yeozphvwauyqncy\",\"type\":\"upkvipmdsc\"}") - .toObject(ComponentVersionInner.class); - Assertions.assertEquals("zejjoqk", model.properties().description()); - Assertions.assertEquals("hsxttaugzxnf", model.properties().properties().get("azpxdtnkdmkqjjl")); - Assertions.assertEquals("xqtnq", model.properties().tags().get("tezlwff")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionInner model = - new ComponentVersionInner() - .withProperties( - new ComponentVersionProperties() - .withDescription("zejjoqk") - .withProperties(mapOf("azpxdtnkdmkqjjl", "hsxttaugzxnf", "ou", "uenvrkp", "aays", "ibreb")) - .withTags(mapOf("tezlwff", "xqtnq", "pqqmted", "iakp")) - .withIsAnonymous(true) - .withIsArchived(false) - .withComponentSpec("datarnjwmw")); - model = BinaryData.fromObject(model).toObject(ComponentVersionInner.class); - Assertions.assertEquals("zejjoqk", model.properties().description()); - Assertions.assertEquals("hsxttaugzxnf", model.properties().properties().get("azpxdtnkdmkqjjl")); - Assertions.assertEquals("xqtnq", model.properties().tags().get("tezlwff")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java deleted file mode 100644 index b9d87e131cd96..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java +++ /dev/null @@ -1,57 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionProperties model = - BinaryData - .fromString( - "{\"componentSpec\":\"dataqupevzh\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"hojujbypelmcuv\",\"properties\":{\"fw\":\"bjx\",\"coolsttpkiwkkb\":\"yl\",\"fpncurdo\":\"ujrywvtyl\",\"cbihwqk\":\"wiithtywub\"},\"tags\":{\"dgoihxumwctondzj\":\"ntwjch\",\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\"}}") - .toObject(ComponentVersionProperties.class); - Assertions.assertEquals("hojujbypelmcuv", model.description()); - Assertions.assertEquals("bjx", model.properties().get("fw")); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionProperties model = - new ComponentVersionProperties() - .withDescription("hojujbypelmcuv") - .withProperties( - mapOf("fw", "bjx", "coolsttpkiwkkb", "yl", "fpncurdo", "ujrywvtyl", "cbihwqk", "wiithtywub")) - .withTags(mapOf("dgoihxumwctondzj", "ntwjch", "fdlwg", "uu", "gseinq", "ytsbwtovv")) - .withIsAnonymous(true) - .withIsArchived(false) - .withComponentSpec("dataqupevzh"); - model = BinaryData.fromObject(model).toObject(ComponentVersionProperties.class); - Assertions.assertEquals("hojujbypelmcuv", model.description()); - Assertions.assertEquals("bjx", model.properties().get("fw")); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 7b0f86dc01c1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,64 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"sxkm\",\"value\":[{\"properties\":{\"componentSpec\":\"datakrrjrea\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"mhjglikkxwslolb\",\"properties\":{},\"tags\":{}},\"id\":\"zlmvfelfktgp\",\"name\":\"crpw\",\"type\":\"xeznoi\"}]}") - .toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("sxkm", model.nextLink()); - Assertions.assertEquals("mhjglikkxwslolb", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model = - new ComponentVersionResourceArmPaginatedResult() - .withNextLink("sxkm") - .withValue( - Arrays - .asList( - new ComponentVersionInner() - .withProperties( - new ComponentVersionProperties() - .withDescription("mhjglikkxwslolb") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(true) - .withComponentSpec("datakrrjrea")))); - model = BinaryData.fromObject(model).toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("sxkm", model.nextLink()); - Assertions.assertEquals("mhjglikkxwslolb", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index f2df4fe9d91ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,97 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -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 ComponentVersionsCreateOrUpdateWithResponseMockTests { - @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\":{\"componentSpec\":\"dataudpabcreuwzos\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"vasormrexzvdubew\",\"properties\":{\"ovsdqhzrtdbakrli\":\"gbaduve\",\"ifjmclngygnh\":\"zfvppkeq\"},\"tags\":{\"oqtrotpvclpo\":\"mbcdtajdopggorw\",\"xjgvh\":\"yrlmwkptsk\",\"ookbpu\":\"ccbmkakm\",\"kmlwkt\":\"mgvmuy\"}},\"id\":\"wzkroyrdurxfl\",\"name\":\"qjimejtgzjxxlfej\",\"type\":\"zuqloiwyayyzivr\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = - manager - .componentVersions() - .define("zkn") - .withExistingComponent("jzkcasfwzcntog", "fjwajnrt", "zvaqkifmxawost") - .withProperties( - new ComponentVersionProperties() - .withDescription("fnqqwyp") - .withProperties(mapOf("b", "r")) - .withTags(mapOf("wjfkainjmuym", "tggrss", "gmusaictdscnkzzo", "ecvztsc")) - .withIsAnonymous(false) - .withIsArchived(true) - .withComponentSpec("datakmjqncfvdsc")) - .create(); - - Assertions.assertEquals("vasormrexzvdubew", response.properties().description()); - Assertions.assertEquals("gbaduve", response.properties().properties().get("ovsdqhzrtdbakrli")); - Assertions.assertEquals("mbcdtajdopggorw", response.properties().tags().get("oqtrotpvclpo")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 2335daf835ca7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 ComponentVersionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .componentVersions() - .deleteWithResponse( - "gdusxurs", "ivuxcjkcoqwczs", "iqrizfwihvaan", "qtnhjrfd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 35b5951185f6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -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 ComponentVersionsGetWithResponseMockTests { - @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\":{\"componentSpec\":\"datafkumcfjxoky\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"vfnkwmygjjekrk\",\"properties\":{\"rdtulcrcjdklotcs\":\"rugjqyckgtx\",\"zoonsv\":\"b\"},\"tags\":{\"nn\":\"hkxfpwhdyslbklgl\",\"xrid\":\"kwayqshwy\",\"aqjmkgxqwque\":\"tb\"}},\"id\":\"ylztp\",\"name\":\"iizevjykofvez\",\"type\":\"fkhkqtwqlep\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = - manager - .componentVersions() - .getWithResponse( - "fdvbbaexxjfwtg", "fkkauigvmua", "mczfedyuepsvplt", "dajjvywe", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vfnkwmygjjekrk", response.properties().description()); - Assertions.assertEquals("rugjqyckgtx", response.properties().properties().get("rdtulcrcjdklotcs")); - Assertions.assertEquals("hkxfpwhdyslbklgl", response.properties().tags().get("nn")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java deleted file mode 100644 index ebfe28fbc2a34..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 ComponentVersionsListMockTests { - @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\":{\"componentSpec\":\"datask\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"ahzllrqmtlpb\",\"properties\":{\"noiicsu\":\"oiduyqypff\"},\"tags\":{\"oluqwgusxxhdo\":\"brjjtalxrdsjr\"}},\"id\":\"jwyblvtbdmvsb\",\"name\":\"idaelqpvekmkwjfb\",\"type\":\"tlo\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .componentVersions() - .list( - "nimx", - "pnerxrzut", - "lcurzaqmnbx", - "aehtd", - 2095580918, - "mbnvynfaooeacted", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ahzllrqmtlpb", response.iterator().next().properties().description()); - Assertions.assertEquals("oiduyqypff", response.iterator().next().properties().properties().get("noiicsu")); - Assertions.assertEquals("brjjtalxrdsjr", response.iterator().next().properties().tags().get("oluqwgusxxhdo")); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java deleted file mode 100644 index 353ba419fa065..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceApplicationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceApplication model = - BinaryData - .fromString("{\"displayName\":\"cyychunsjlp\",\"endpointUri\":\"twszhvvuic\"}") - .toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("cyychunsjlp", model.displayName()); - Assertions.assertEquals("twszhvvuic", model.endpointUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceApplication model = - new ComputeInstanceApplication().withDisplayName("cyychunsjlp").withEndpointUri("twszhvvuic"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("cyychunsjlp", model.displayName()); - Assertions.assertEquals("twszhvvuic", model.endpointUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java deleted file mode 100644 index e817919d853fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints; - -public final class ComputeInstanceConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = - BinaryData - .fromString("{\"publicIpAddress\":\"vbrdfjmzsyzfho\",\"privateIpAddress\":\"h\"}") - .toObject(ComputeInstanceConnectivityEndpoints.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = new ComputeInstanceConnectivityEndpoints(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceConnectivityEndpoints.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java deleted file mode 100644 index 7fdfda816fde6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java +++ /dev/null @@ -1,48 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Autosave; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import com.azure.resourcemanager.machinelearning.models.Network; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceContainer model = - BinaryData - .fromString( - "{\"name\":\"khvuhxepmrutz\",\"autosave\":\"Remote\",\"gpu\":\"obns\",\"network\":\"Host\",\"environment\":{\"name\":\"ltymkmvguihywart\",\"version\":\"phkixkykxdssjpe\"},\"services\":[\"datacfxhikkflrmy\"]}") - .toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("khvuhxepmrutz", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("obns", model.gpu()); - Assertions.assertEquals(Network.HOST, model.network()); - Assertions.assertEquals("ltymkmvguihywart", model.environment().name()); - Assertions.assertEquals("phkixkykxdssjpe", model.environment().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceContainer model = - new ComputeInstanceContainer() - .withName("khvuhxepmrutz") - .withAutosave(Autosave.REMOTE) - .withGpu("obns") - .withNetwork(Network.HOST) - .withEnvironment( - new ComputeInstanceEnvironmentInfo().withName("ltymkmvguihywart").withVersion("phkixkykxdssjpe")); - model = BinaryData.fromObject(model).toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("khvuhxepmrutz", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("obns", model.gpu()); - Assertions.assertEquals(Network.HOST, model.network()); - Assertions.assertEquals("ltymkmvguihywart", model.environment().name()); - Assertions.assertEquals("phkixkykxdssjpe", model.environment().version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java deleted file mode 100644 index bb0dc3aac424c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy; - -public final class ComputeInstanceCreatedByTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceCreatedBy model = - BinaryData - .fromString( - "{\"userName\":\"vtrrmhwrbfdpyflu\",\"userOrgId\":\"vjglrocuyzlwhhme\",\"userId\":\"ooclutnp\"}") - .toObject(ComputeInstanceCreatedBy.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceCreatedBy model = new ComputeInstanceCreatedBy(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceCreatedBy.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java deleted file mode 100644 index e59e9c32edd91..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Caching; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk; -import com.azure.resourcemanager.machinelearning.models.StorageAccountType; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataDisk model = - BinaryData - .fromString( - "{\"caching\":\"ReadWrite\",\"diskSizeGB\":264674589,\"lun\":753182470,\"storageAccountType\":\"Premium_LRS\"}") - .toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_WRITE, model.caching()); - Assertions.assertEquals(264674589, model.diskSizeGB()); - Assertions.assertEquals(753182470, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataDisk model = - new ComputeInstanceDataDisk() - .withCaching(Caching.READ_WRITE) - .withDiskSizeGB(264674589) - .withLun(753182470) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_WRITE, model.caching()); - Assertions.assertEquals(264674589, model.diskSizeGB()); - Assertions.assertEquals(753182470, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java deleted file mode 100644 index 5580c97a01ba0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java +++ /dev/null @@ -1,58 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; -import com.azure.resourcemanager.machinelearning.models.MountAction; -import com.azure.resourcemanager.machinelearning.models.MountState; -import com.azure.resourcemanager.machinelearning.models.SourceType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataMount model = - BinaryData - .fromString( - "{\"source\":\"wlxte\",\"sourceType\":\"URI\",\"mountName\":\"jgwdtgukranbl\",\"mountAction\":\"Unmount\",\"createdBy\":\"lkccuzgygqwa\",\"mountPath\":\"iul\",\"mountState\":\"UnmountFailed\",\"mountedOn\":\"2021-09-27T01:24:26Z\",\"error\":\"rglvaw\"}") - .toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("wlxte", model.source()); - Assertions.assertEquals(SourceType.URI, model.sourceType()); - Assertions.assertEquals("jgwdtgukranbl", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("lkccuzgygqwa", model.createdBy()); - Assertions.assertEquals("iul", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNT_FAILED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T01:24:26Z"), model.mountedOn()); - Assertions.assertEquals("rglvaw", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataMount model = - new ComputeInstanceDataMount() - .withSource("wlxte") - .withSourceType(SourceType.URI) - .withMountName("jgwdtgukranbl") - .withMountAction(MountAction.UNMOUNT) - .withCreatedBy("lkccuzgygqwa") - .withMountPath("iul") - .withMountState(MountState.UNMOUNT_FAILED) - .withMountedOn(OffsetDateTime.parse("2021-09-27T01:24:26Z")) - .withError("rglvaw"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("wlxte", model.source()); - Assertions.assertEquals(SourceType.URI, model.sourceType()); - Assertions.assertEquals("jgwdtgukranbl", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("lkccuzgygqwa", model.createdBy()); - Assertions.assertEquals("iul", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNT_FAILED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T01:24:26Z"), model.mountedOn()); - Assertions.assertEquals("rglvaw", model.error()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java deleted file mode 100644 index 17390ecdc9f3a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceEnvironmentInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceEnvironmentInfo model = - BinaryData - .fromString("{\"name\":\"incqlhriswsl\",\"version\":\"iiovgqcgxu\"}") - .toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("incqlhriswsl", model.name()); - Assertions.assertEquals("iiovgqcgxu", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceEnvironmentInfo model = - new ComputeInstanceEnvironmentInfo().withName("incqlhriswsl").withVersion("iiovgqcgxu"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("incqlhriswsl", model.name()); - Assertions.assertEquals("iiovgqcgxu", model.version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java deleted file mode 100644 index 665d6aa9d183d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation; -import com.azure.resourcemanager.machinelearning.models.OperationName; -import com.azure.resourcemanager.machinelearning.models.OperationStatus; -import com.azure.resourcemanager.machinelearning.models.OperationTrigger; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceLastOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceLastOperation model = - BinaryData - .fromString( - "{\"operationName\":\"Reimage\",\"operationTime\":\"2021-10-12T06:41:45Z\",\"operationStatus\":\"InProgress\",\"operationTrigger\":\"IdleShutdown\"}") - .toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.REIMAGE, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T06:41:45Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceLastOperation model = - new ComputeInstanceLastOperation() - .withOperationName(OperationName.REIMAGE) - .withOperationTime(OffsetDateTime.parse("2021-10-12T06:41:45Z")) - .withOperationStatus(OperationStatus.IN_PROGRESS) - .withOperationTrigger(OperationTrigger.IDLE_SHUTDOWN); - model = BinaryData.fromObject(model).toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.REIMAGE, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T06:41:45Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java deleted file mode 100644 index 4e09a116f0b0f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceVersion model = - BinaryData.fromString("{\"runtime\":\"z\"}").toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("z", model.runtime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceVersion model = new ComputeInstanceVersion().withRuntime("z"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("z", model.runtime()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java deleted file mode 100644 index 2e193135041f0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceInner model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"7fba71ed-02a3-4dcb-81fc-4ba57769d9aa\",\"tenantId\":\"e70fe5bc-d75a-4541-bc8f-32e7904dcaaf\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"idokgjlj\":{\"principalId\":\"94a7d9af-e519-4c92-87c2-8418a856bc2c\",\"clientId\":\"29eb96fc-b273-4899-963f-bd7b5e463024\"}}},\"location\":\"xgvcl\",\"tags\":{\"bijhtxfvgxbf\":\"sncghkjeszz\",\"ec\":\"mxnehmp\",\"gr\":\"godebfqkkrbmpu\"},\"sku\":{\"name\":\"flz\",\"tier\":\"Standard\",\"size\":\"zpuzycisp\",\"family\":\"zahmgkbrpyydhibn\",\"capacity\":2043148337},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"kadrgvt\",\"provisioningState\":\"Unknown\",\"description\":\"buynhijggm\",\"createdOn\":\"2021-03-31T00:28:57Z\",\"modifiedOn\":\"2021-01-01T18:17:26Z\",\"resourceId\":\"rbu\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"zzmhjrunmpxttd\",\"name\":\"hrbnlankxmyskpbh\",\"type\":\"nbtkcxywnytnr\"}") - .toObject(ComputeResourceInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xgvcl", model.location()); - Assertions.assertEquals("sncghkjeszz", model.tags().get("bijhtxfvgxbf")); - Assertions.assertEquals("flz", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("zpuzycisp", model.sku().size()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.sku().family()); - Assertions.assertEquals(2043148337, model.sku().capacity()); - Assertions.assertEquals("kadrgvt", model.properties().computeLocation()); - Assertions.assertEquals("buynhijggm", model.properties().description()); - Assertions.assertEquals("rbu", model.properties().resourceId()); - Assertions.assertEquals(true, model.properties().disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceInner model = - new ComputeResourceInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("idokgjlj", new UserAssignedIdentity()))) - .withLocation("xgvcl") - .withTags(mapOf("bijhtxfvgxbf", "sncghkjeszz", "ec", "mxnehmp", "gr", "godebfqkkrbmpu")) - .withSku( - new Sku() - .withName("flz") - .withTier(SkuTier.STANDARD) - .withSize("zpuzycisp") - .withFamily("zahmgkbrpyydhibn") - .withCapacity(2043148337)) - .withProperties( - new Compute() - .withComputeLocation("kadrgvt") - .withDescription("buynhijggm") - .withResourceId("rbu") - .withDisableLocalAuth(true)); - model = BinaryData.fromObject(model).toObject(ComputeResourceInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xgvcl", model.location()); - Assertions.assertEquals("sncghkjeszz", model.tags().get("bijhtxfvgxbf")); - Assertions.assertEquals("flz", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("zpuzycisp", model.sku().size()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.sku().family()); - Assertions.assertEquals(2043148337, model.sku().capacity()); - Assertions.assertEquals("kadrgvt", model.properties().computeLocation()); - Assertions.assertEquals("buynhijggm", model.properties().description()); - Assertions.assertEquals("rbu", model.properties().resourceId()); - Assertions.assertEquals(true, model.properties().disableLocalAuth()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java deleted file mode 100644 index ace304817ef71..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java +++ /dev/null @@ -1,42 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ComputeResourceSchema; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceSchema model = - BinaryData - .fromString( - "{\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"lqidyby\",\"provisioningState\":\"Updating\",\"description\":\"clha\",\"createdOn\":\"2021-03-19T01:34:05Z\",\"modifiedOn\":\"2021-01-19T10:24:33Z\",\"resourceId\":\"p\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}}") - .toObject(ComputeResourceSchema.class); - Assertions.assertEquals("lqidyby", model.properties().computeLocation()); - Assertions.assertEquals("clha", model.properties().description()); - Assertions.assertEquals("p", model.properties().resourceId()); - Assertions.assertEquals(false, model.properties().disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceSchema model = - new ComputeResourceSchema() - .withProperties( - new Compute() - .withComputeLocation("lqidyby") - .withDescription("clha") - .withResourceId("p") - .withDisableLocalAuth(false)); - model = BinaryData.fromObject(model).toObject(ComputeResourceSchema.class); - Assertions.assertEquals("lqidyby", model.properties().computeLocation()); - Assertions.assertEquals("clha", model.properties().description()); - Assertions.assertEquals("p", model.properties().resourceId()); - Assertions.assertEquals(false, model.properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java deleted file mode 100644 index 95463915c5068..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java +++ /dev/null @@ -1,164 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import com.azure.resourcemanager.machinelearning.models.TriggerType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeSchedulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSchedules model = - BinaryData - .fromString( - "{\"computeStartStop\":[{\"id\":\"lxrzvhqjwtr\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":1941330764,\"endTime\":\"w\",\"startTime\":\"jsmwrokc\",\"timeZone\":\"fzzzwyjafitlhg\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"nuchlgmltxdwhmo\",\"endTime\":\"sgzv\",\"startTime\":\"snnjzfpafolpym\",\"timeZone\":\"mxq\"},\"schedule\":{\"id\":\"gpgdphtvdulaj\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Enabled\"}},{\"id\":\"csrlzknmzl\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":794571898,\"endTime\":\"q\",\"startTime\":\"jhmqrhvthla\",\"timeZone\":\"dcxsmlz\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"zdtxetlgyd\",\"endTime\":\"qvlnnpxybafiqgea\",\"startTime\":\"bgj\",\"timeZone\":\"glklb\"},\"schedule\":{\"id\":\"idwcwvmzegjon\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}},{\"id\":\"gdn\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1147399422,\"endTime\":\"sjcitdigsxc\",\"startTime\":\"l\",\"timeZone\":\"lkeuac\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"omflrytswfp\",\"endTime\":\"dgycxnmskwhqjjy\",\"startTime\":\"urlpshh\",\"timeZone\":\"pedwqsl\"},\"schedule\":{\"id\":\"mpqvwwsk\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}},{\"id\":\"wimuvqej\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":1658057009,\"endTime\":\"uqtljqobbpih\",\"startTime\":\"cecybmrqbrjbbmpx\",\"timeZone\":\"vykfrexcrse\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"jksghudg\",\"endTime\":\"xog\",\"startTime\":\"gsv\",\"timeZone\":\"jkxibda\"},\"schedule\":{\"id\":\"kmdyomkxfbvfbh\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}}]}") - .toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.START, model.computeStartStop().get(0).action()); - Assertions.assertEquals(TriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals("w", model.computeStartStop().get(0).recurrence().endTime()); - Assertions.assertEquals("jsmwrokc", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("fzzzwyjafitlhg", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(1941330764, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("sgzv", model.computeStartStop().get(0).cron().endTime()); - Assertions.assertEquals("snnjzfpafolpym", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("mxq", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("gpgdphtvdulaj", model.computeStartStop().get(0).schedule().id()); - Assertions - .assertEquals( - ScheduleProvisioningState.PROVISIONING, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSchedules model = - new ComputeSchedules() - .withComputeStartStop( - Arrays - .asList( - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("w") - .withStartTime("jsmwrokc") - .withTimeZone("fzzzwyjafitlhg") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(1941330764)) - .withCron( - new CronTrigger() - .withEndTime("sgzv") - .withStartTime("snnjzfpafolpym") - .withTimeZone("mxq") - .withExpression("nuchlgmltxdwhmo")) - .withSchedule( - new ScheduleBase() - .withId("gpgdphtvdulaj") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.ENABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("q") - .withStartTime("jhmqrhvthla") - .withTimeZone("dcxsmlz") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(794571898)) - .withCron( - new CronTrigger() - .withEndTime("qvlnnpxybafiqgea") - .withStartTime("bgj") - .withTimeZone("glklb") - .withExpression("zdtxetlgyd")) - .withSchedule( - new ScheduleBase() - .withId("idwcwvmzegjon") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("sjcitdigsxc") - .withStartTime("l") - .withTimeZone("lkeuac") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1147399422)) - .withCron( - new CronTrigger() - .withEndTime("dgycxnmskwhqjjy") - .withStartTime("urlpshh") - .withTimeZone("pedwqsl") - .withExpression("omflrytswfp")) - .withSchedule( - new ScheduleBase() - .withId("mpqvwwsk") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.RECURRENCE) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("uqtljqobbpih") - .withStartTime("cecybmrqbrjbbmpx") - .withTimeZone("vykfrexcrse") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(1658057009)) - .withCron( - new CronTrigger() - .withEndTime("xog") - .withStartTime("gsv") - .withTimeZone("jkxibda") - .withExpression("jksghudg")) - .withSchedule( - new ScheduleBase() - .withId("kmdyomkxfbvfbh") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED)))); - model = BinaryData.fromObject(model).toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.START, model.computeStartStop().get(0).action()); - Assertions.assertEquals(TriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals("w", model.computeStartStop().get(0).recurrence().endTime()); - Assertions.assertEquals("jsmwrokc", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("fzzzwyjafitlhg", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(1941330764, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("sgzv", model.computeStartStop().get(0).cron().endTime()); - Assertions.assertEquals("snnjzfpafolpym", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("mxq", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("gpgdphtvdulaj", model.computeStartStop().get(0).schedule().id()); - Assertions - .assertEquals( - ScheduleProvisioningState.PROVISIONING, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java deleted file mode 100644 index d0d7dd931e676..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; - -public final class ComputeSecretsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSecretsInner model = - BinaryData.fromString("{\"computeType\":\"ComputeSecrets\"}").toObject(ComputeSecretsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSecretsInner model = new ComputeSecretsInner(); - model = BinaryData.fromObject(model).toObject(ComputeSecretsInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java deleted file mode 100644 index 422af5e5d26e0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java +++ /dev/null @@ -1,103 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import com.azure.resourcemanager.machinelearning.models.TriggerType; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeStartStopScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeStartStopSchedule model = - BinaryData - .fromString( - "{\"id\":\"wpg\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":926595396,\"schedule\":{\"hours\":[1582308433],\"minutes\":[166613008],\"monthDays\":[587867611,1327364121],\"weekDays\":[\"Thursday\"]},\"endTime\":\"bwsnsqow\",\"startTime\":\"comlikytwvczc\",\"timeZone\":\"k\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"ve\",\"endTime\":\"fdv\",\"startTime\":\"hbwrnfxtgddpqth\",\"timeZone\":\"n\"},\"schedule\":{\"id\":\"oya\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}}") - .toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(TriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals("bwsnsqow", model.recurrence().endTime()); - Assertions.assertEquals("comlikytwvczc", model.recurrence().startTime()); - Assertions.assertEquals("k", model.recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.recurrence().frequency()); - Assertions.assertEquals(926595396, model.recurrence().interval()); - Assertions.assertEquals(1582308433, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(166613008, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(587867611, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("fdv", model.cron().endTime()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.cron().startTime()); - Assertions.assertEquals("n", model.cron().timeZone()); - Assertions.assertEquals("ve", model.cron().expression()); - Assertions.assertEquals("oya", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeStartStopSchedule model = - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.ENABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.RECURRENCE) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("bwsnsqow") - .withStartTime("comlikytwvczc") - .withTimeZone("k") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(926595396) - .withSchedule( - new RecurrenceSchedule() - .withHours(Arrays.asList(1582308433)) - .withMinutes(Arrays.asList(166613008)) - .withMonthDays(Arrays.asList(587867611, 1327364121)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY)))) - .withCron( - new CronTrigger() - .withEndTime("fdv") - .withStartTime("hbwrnfxtgddpqth") - .withTimeZone("n") - .withExpression("ve")) - .withSchedule( - new ScheduleBase() - .withId("oya") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED)); - model = BinaryData.fromObject(model).toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(TriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals("bwsnsqow", model.recurrence().endTime()); - Assertions.assertEquals("comlikytwvczc", model.recurrence().startTime()); - Assertions.assertEquals("k", model.recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.recurrence().frequency()); - Assertions.assertEquals(926595396, model.recurrence().interval()); - Assertions.assertEquals(1582308433, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(166613008, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(587867611, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("fdv", model.cron().endTime()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.cron().startTime()); - Assertions.assertEquals("n", model.cron().timeZone()); - Assertions.assertEquals("ve", model.cron().expression()); - Assertions.assertEquals("oya", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java deleted file mode 100644 index 6d5820af19793..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Compute; -import org.junit.jupiter.api.Assertions; - -public final class ComputeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Compute model = - BinaryData - .fromString( - "{\"computeType\":\"Compute\",\"computeLocation\":\"tsthsucocm\",\"provisioningState\":\"Canceled\",\"description\":\"zt\",\"createdOn\":\"2021-04-09T08:14:29Z\",\"modifiedOn\":\"2021-08-28T10:19:16Z\",\"resourceId\":\"qpuedckzywbiex\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false}") - .toObject(Compute.class); - Assertions.assertEquals("tsthsucocm", model.computeLocation()); - Assertions.assertEquals("zt", model.description()); - Assertions.assertEquals("qpuedckzywbiex", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Compute model = - new Compute() - .withComputeLocation("tsthsucocm") - .withDescription("zt") - .withResourceId("qpuedckzywbiex") - .withDisableLocalAuth(false); - model = BinaryData.fromObject(model).toObject(Compute.class); - Assertions.assertEquals("tsthsucocm", model.computeLocation()); - Assertions.assertEquals("zt", model.description()); - Assertions.assertEquals("qpuedckzywbiex", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java deleted file mode 100644 index 34735a5e7776c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,119 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 ComputesCreateOrUpdateMockTests { - @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 = - "{\"identity\":{\"principalId\":\"1ee3bee0-6ff7-49e8-bb68-e00d27bcece0\",\"tenantId\":\"5cc048d8-79ef-4872-886f-a002e40a7489\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"nii\",\"tags\":{\"sjtgirnbgmgmddo\":\"vqban\"},\"sku\":{\"name\":\"mynltwmpftmfoeaj\",\"tier\":\"Standard\",\"size\":\"xwet\",\"family\":\"fddrvlkpzwbhnrec\",\"capacity\":252329651},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"muhkahm\",\"provisioningState\":\"Succeeded\",\"description\":\"iuc\",\"createdOn\":\"2021-02-05T06:18:58Z\",\"modifiedOn\":\"2021-09-23T11:37:53Z\",\"resourceId\":\"jpjbweunxcqr\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false},\"id\":\"hppiybx\",\"name\":\"gnzuzpbgkzcsc\",\"type\":\"iuzvkunhdimju\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeResource response = - manager - .computes() - .define("ojxrjnbsconxavi") - .withExistingWorkspace("mdafbgymqt", "apr") - .withRegion("izqfsgnwdxz") - .withTags(mapOf("rfbo", "q")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withSku( - new Sku() - .withName("ipmlnfyzavf") - .withTier(SkuTier.FREE) - .withSize("icdbkpdj") - .withFamily("qh") - .withCapacity(222903277)) - .withProperties( - new Compute() - .withComputeLocation("dgonjhxshthmgp") - .withDescription("lptkbvc") - .withResourceId("gqqbtimpk") - .withDisableLocalAuth(false)) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nii", response.location()); - Assertions.assertEquals("vqban", response.tags().get("sjtgirnbgmgmddo")); - Assertions.assertEquals("mynltwmpftmfoeaj", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("xwet", response.sku().size()); - Assertions.assertEquals("fddrvlkpzwbhnrec", response.sku().family()); - Assertions.assertEquals(252329651, response.sku().capacity()); - Assertions.assertEquals("muhkahm", response.properties().computeLocation()); - Assertions.assertEquals("iuc", response.properties().description()); - Assertions.assertEquals("jpjbweunxcqr", response.properties().resourceId()); - Assertions.assertEquals(false, response.properties().disableLocalAuth()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java deleted file mode 100644 index 08eeb0e3f5775..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java +++ /dev/null @@ -1,65 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -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 ComputesDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .computes() - .delete( - "tlqh", "pxouvmr", "iflikyypzkgxfx", UnderlyingResourceAction.DETACH, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java deleted file mode 100644 index ed6becf3e9e77..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 ComputesGetWithResponseMockTests { - @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 = - "{\"identity\":{\"principalId\":\"1de443a3-f608-425f-91bd-438d47ec26d7\",\"tenantId\":\"e37f22c1-6b70-4a8c-8d5a-d0815df251d2\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"kgd\",\"tags\":{\"qsktxqf\":\"krukizyhgsqt\",\"cgbfzuscstun\":\"jbqggweeiwdhdm\",\"bkl\":\"lhxd\",\"f\":\"iichgjsysmvxodgw\"},\"sku\":{\"name\":\"sifcuvbdujgc\",\"tier\":\"Free\",\"size\":\"cbbwjtrdxriz\",\"family\":\"bbgiarksykpgdqxw\",\"capacity\":230334707},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"qrxhaclcdos\",\"provisioningState\":\"Creating\",\"description\":\"jqgkifmmainwhe\",\"createdOn\":\"2021-07-02T12:23:07Z\",\"modifiedOn\":\"2021-11-29T01:34:21Z\",\"resourceId\":\"wuntobuiz\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"vydjufbnk\",\"name\":\"blaxpegj\",\"type\":\"dabalfdxaglzfytl\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeResource response = - manager - .computes() - .getWithResponse("xampqcr", "g", "uqxbpiatwfauje", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("kgd", response.location()); - Assertions.assertEquals("krukizyhgsqt", response.tags().get("qsktxqf")); - Assertions.assertEquals("sifcuvbdujgc", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("cbbwjtrdxriz", response.sku().size()); - Assertions.assertEquals("bbgiarksykpgdqxw", response.sku().family()); - Assertions.assertEquals(230334707, response.sku().capacity()); - Assertions.assertEquals("qrxhaclcdos", response.properties().computeLocation()); - Assertions.assertEquals("jqgkifmmainwhe", response.properties().description()); - Assertions.assertEquals("wuntobuiz", response.properties().resourceId()); - Assertions.assertEquals(true, response.properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java deleted file mode 100644 index cdf7973f94365..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -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 ComputesListKeysWithResponseMockTests { - @Test - public void testListKeysWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"computeType\":\"ComputeSecrets\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeSecrets response = - manager - .computes() - .listKeysWithResponse("lilw", "ghjhjvmabzzbwa", "b", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java deleted file mode 100644 index 31b5b2dd45c8c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 ComputesListMockTests { - @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\":[{\"identity\":{\"principalId\":\"0be36eb6-1866-4b48-9c68-496f7e78e9dd\",\"tenantId\":\"3db7bdd0-a243-4495-af5a-9360ec87f65c\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"ujmoi\",\"tags\":{\"jslkyozdsfzjue\":\"wemhdee\",\"jtv\":\"rhrhtsl\",\"xvgjbfi\":\"j\",\"bj\":\"bpnjodf\"},\"sku\":{\"name\":\"wmtqsmoxsaz\",\"tier\":\"Basic\",\"size\":\"gwecywnfysz\",\"family\":\"czs\",\"capacity\":57372147},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"ddbboz\",\"provisioningState\":\"Deleting\",\"description\":\"mkjmyitrchwudlxe\",\"createdOn\":\"2021-07-21T06:48:48Z\",\"modifiedOn\":\"2021-01-08T01:59:39Z\",\"resourceId\":\"noejhqlfmsibz\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"ydpmypgfqvmt\",\"name\":\"whlakxpejpew\",\"type\":\"yjl\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.computes().list("zb", "yqjoghdsa", "djanormo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("ujmoi", response.iterator().next().location()); - Assertions.assertEquals("wemhdee", response.iterator().next().tags().get("jslkyozdsfzjue")); - Assertions.assertEquals("wmtqsmoxsaz", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("gwecywnfysz", response.iterator().next().sku().size()); - Assertions.assertEquals("czs", response.iterator().next().sku().family()); - Assertions.assertEquals(57372147, response.iterator().next().sku().capacity()); - Assertions.assertEquals("ddbboz", response.iterator().next().properties().computeLocation()); - Assertions.assertEquals("mkjmyitrchwudlxe", response.iterator().next().properties().description()); - Assertions.assertEquals("noejhqlfmsibz", response.iterator().next().properties().resourceId()); - Assertions.assertEquals(true, response.iterator().next().properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java deleted file mode 100644 index 72ba2b3c739f9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java +++ /dev/null @@ -1,65 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -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 ComputesListNodesMockTests { - @Test - public void testListNodes() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nodes\":[{\"nodeId\":\"skw\",\"privateIpAddress\":\"sdetjygowifcqpol\",\"publicIpAddress\":\"gysdgzyyb\",\"port\":375628920,\"nodeState\":\"running\",\"runId\":\"cptvdxxheig\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.computes().listNodes("yrqsdbpokszanm", "wgpterdiuw", "i", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java deleted file mode 100644 index 1f0d2cfe906e1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceRequirementsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceRequirements model = - BinaryData - .fromString( - "{\"containerResourceLimits\":{\"cpu\":\"wllcolsr\",\"gpu\":\"apte\",\"memory\":\"excgjokjljnhvl\"},\"containerResourceRequests\":{\"cpu\":\"ek\",\"gpu\":\"eksnbksdqhjvyk\",\"memory\":\"eslk\"}}") - .toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("wllcolsr", model.containerResourceLimits().cpu()); - Assertions.assertEquals("apte", model.containerResourceLimits().gpu()); - Assertions.assertEquals("excgjokjljnhvl", model.containerResourceLimits().memory()); - Assertions.assertEquals("ek", model.containerResourceRequests().cpu()); - Assertions.assertEquals("eksnbksdqhjvyk", model.containerResourceRequests().gpu()); - Assertions.assertEquals("eslk", model.containerResourceRequests().memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceRequirements model = - new ContainerResourceRequirements() - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("wllcolsr").withGpu("apte").withMemory("excgjokjljnhvl")) - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("ek").withGpu("eksnbksdqhjvyk").withMemory("eslk")); - model = BinaryData.fromObject(model).toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("wllcolsr", model.containerResourceLimits().cpu()); - Assertions.assertEquals("apte", model.containerResourceLimits().gpu()); - Assertions.assertEquals("excgjokjljnhvl", model.containerResourceLimits().memory()); - Assertions.assertEquals("ek", model.containerResourceRequests().cpu()); - Assertions.assertEquals("eksnbksdqhjvyk", model.containerResourceRequests().gpu()); - Assertions.assertEquals("eslk", model.containerResourceRequests().memory()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java deleted file mode 100644 index 430c11d570d60..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceSettings model = - BinaryData - .fromString("{\"cpu\":\"ustcpoq\",\"gpu\":\"vnwqjwgo\",\"memory\":\"lejjjkxy\"}") - .toObject(ContainerResourceSettings.class); - Assertions.assertEquals("ustcpoq", model.cpu()); - Assertions.assertEquals("vnwqjwgo", model.gpu()); - Assertions.assertEquals("lejjjkxy", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceSettings model = - new ContainerResourceSettings().withCpu("ustcpoq").withGpu("vnwqjwgo").withMemory("lejjjkxy"); - model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class); - Assertions.assertEquals("ustcpoq", model.cpu()); - Assertions.assertEquals("vnwqjwgo", model.gpu()); - Assertions.assertEquals("lejjjkxy", model.memory()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java deleted file mode 100644 index eb119224d22af..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import org.junit.jupiter.api.Assertions; - -public final class CosmosDbSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CosmosDbSettings model = - BinaryData.fromString("{\"collectionsThroughput\":1098993569}").toObject(CosmosDbSettings.class); - Assertions.assertEquals(1098993569, model.collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1098993569); - model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class); - Assertions.assertEquals(1098993569, model.collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java deleted file mode 100644 index 946de8b11fecc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import org.junit.jupiter.api.Assertions; - -public final class CronTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CronTrigger model = - BinaryData - .fromString( - "{\"triggerType\":\"Cron\",\"expression\":\"ksrl\",\"endTime\":\"desqplpvmjcdo\",\"startTime\":\"bidyv\",\"timeZone\":\"owx\"}") - .toObject(CronTrigger.class); - Assertions.assertEquals("desqplpvmjcdo", model.endTime()); - Assertions.assertEquals("bidyv", model.startTime()); - Assertions.assertEquals("owx", model.timeZone()); - Assertions.assertEquals("ksrl", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CronTrigger model = - new CronTrigger() - .withEndTime("desqplpvmjcdo") - .withStartTime("bidyv") - .withTimeZone("owx") - .withExpression("ksrl"); - model = BinaryData.fromObject(model).toObject(CronTrigger.class); - Assertions.assertEquals("desqplpvmjcdo", model.endTime()); - Assertions.assertEquals("bidyv", model.startTime()); - Assertions.assertEquals("owx", model.timeZone()); - Assertions.assertEquals("ksrl", model.expression()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java deleted file mode 100644 index 0204d2f8ca62d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon; -import org.junit.jupiter.api.Assertions; - -public final class CustomForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomForecastHorizon model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":632851650}").toObject(CustomForecastHorizon.class); - Assertions.assertEquals(632851650, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomForecastHorizon model = new CustomForecastHorizon().withValue(632851650); - model = BinaryData.fromObject(model).toObject(CustomForecastHorizon.class); - Assertions.assertEquals(632851650, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java deleted file mode 100644 index e397e628a6a11..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java +++ /dev/null @@ -1,34 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"custom_model\",\"mode\":\"Direct\",\"uri\":\"bkjbz\",\"description\":\"nsvk\"}") - .toObject(CustomModelJobInput.class); - Assertions.assertEquals("nsvk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("bkjbz", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobInput model = - new CustomModelJobInput().withDescription("nsvk").withMode(InputDeliveryMode.DIRECT).withUri("bkjbz"); - model = BinaryData.fromObject(model).toObject(CustomModelJobInput.class); - Assertions.assertEquals("nsvk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("bkjbz", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java deleted file mode 100644 index af669e82b1c3b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"custom_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"tjknsxfwushcdp\",\"description\":\"pn\"}") - .toObject(CustomModelJobOutput.class); - Assertions.assertEquals("pn", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("tjknsxfwushcdp", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobOutput model = - new CustomModelJobOutput() - .withDescription("pn") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("tjknsxfwushcdp"); - model = BinaryData.fromObject(model).toObject(CustomModelJobOutput.class); - Assertions.assertEquals("pn", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("tjknsxfwushcdp", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java deleted file mode 100644 index 07b772a2ac82a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations; -import org.junit.jupiter.api.Assertions; - -public final class CustomNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomNCrossValidations model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":691698964}").toObject(CustomNCrossValidations.class); - Assertions.assertEquals(691698964, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomNCrossValidations model = new CustomNCrossValidations().withValue(691698964); - model = BinaryData.fromObject(model).toObject(CustomNCrossValidations.class); - Assertions.assertEquals(691698964, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java deleted file mode 100644 index 8f1caf6d57906..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomSeasonality; -import org.junit.jupiter.api.Assertions; - -public final class CustomSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomSeasonality model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":1578351643}").toObject(CustomSeasonality.class); - Assertions.assertEquals(1578351643, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomSeasonality model = new CustomSeasonality().withValue(1578351643); - model = BinaryData.fromObject(model).toObject(CustomSeasonality.class); - Assertions.assertEquals(1578351643, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java deleted file mode 100644 index b6cfdaad5bdf8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetLags; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetLags model = - BinaryData - .fromString("{\"mode\":\"Custom\",\"values\":[915823701,1407190218,425904374]}") - .toObject(CustomTargetLags.class); - Assertions.assertEquals(915823701, model.values().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(915823701, 1407190218, 425904374)); - model = BinaryData.fromObject(model).toObject(CustomTargetLags.class); - Assertions.assertEquals(915823701, model.values().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java deleted file mode 100644 index 6af5bc3d69578..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetRollingWindowSize model = - BinaryData - .fromString("{\"mode\":\"Custom\",\"value\":482115950}") - .toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(482115950, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(482115950); - model = BinaryData.fromObject(model).toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(482115950, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java deleted file mode 100644 index 80d46d3567473..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"ycnunvjsrtk\",\"nextVersion\":\"wnopqgikyzirtx\",\"description\":\"uxzejntpsew\",\"properties\":{\"rydxtqm\":\"ilqu\"},\"tags\":{\"f\":\"xorgg\"}},\"id\":\"aomtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}") - .toObject(DataContainerInner.class); - Assertions.assertEquals("uxzejntpsew", model.properties().description()); - Assertions.assertEquals("ilqu", model.properties().properties().get("rydxtqm")); - Assertions.assertEquals("xorgg", model.properties().tags().get("f")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerInner model = - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("uxzejntpsew") - .withProperties(mapOf("rydxtqm", "ilqu")) - .withTags(mapOf("f", "xorgg")) - .withIsArchived(true) - .withDataType(DataType.URI_FOLDER)); - model = BinaryData.fromObject(model).toObject(DataContainerInner.class); - Assertions.assertEquals("uxzejntpsew", model.properties().description()); - Assertions.assertEquals("ilqu", model.properties().properties().get("rydxtqm")); - Assertions.assertEquals("xorgg", model.properties().tags().get("f")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java deleted file mode 100644 index 2b0434e60be5c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java +++ /dev/null @@ -1,74 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerProperties model = - BinaryData - .fromString( - "{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"vwxnbkfe\",\"nextVersion\":\"xscyhwzdgirujbz\",\"description\":\"mvzzbtdcqvp\",\"properties\":{\"n\":\"ujviylwdshfs\",\"rymsgaojfmw\":\"bgye\",\"hirctymoxoftpipi\":\"cotmr\",\"lihhyuspskasdvlm\":\"yczuhxacpq\"},\"tags\":{\"ulucv\":\"gz\",\"urisjnhnytxifqj\":\"amrsreuzv\",\"esutrgjupauutpw\":\"gxmrhublwp\",\"jqgwzp\":\"qhih\"}}") - .toObject(DataContainerProperties.class); - Assertions.assertEquals("mvzzbtdcqvp", model.description()); - Assertions.assertEquals("ujviylwdshfs", model.properties().get("n")); - Assertions.assertEquals("gz", model.tags().get("ulucv")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(DataType.MLTABLE, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerProperties model = - new DataContainerProperties() - .withDescription("mvzzbtdcqvp") - .withProperties( - mapOf( - "n", - "ujviylwdshfs", - "rymsgaojfmw", - "bgye", - "hirctymoxoftpipi", - "cotmr", - "lihhyuspskasdvlm", - "yczuhxacpq")) - .withTags( - mapOf( - "ulucv", - "gz", - "urisjnhnytxifqj", - "amrsreuzv", - "esutrgjupauutpw", - "gxmrhublwp", - "jqgwzp", - "qhih")) - .withIsArchived(false) - .withDataType(DataType.MLTABLE); - model = BinaryData.fromObject(model).toObject(DataContainerProperties.class); - Assertions.assertEquals("mvzzbtdcqvp", model.description()); - Assertions.assertEquals("ujviylwdshfs", model.properties().get("n")); - Assertions.assertEquals("gz", model.tags().get("ulucv")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(DataType.MLTABLE, model.dataType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index a4e0717beafe1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,72 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ufxqknpirgnepttw\",\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"cdm\",\"nextVersion\":\"r\",\"description\":\"lpijnkrxfrd\",\"properties\":{},\"tags\":{}},\"id\":\"atiz\",\"name\":\"ronasxift\",\"type\":\"zq\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"wesgogczh\",\"nextVersion\":\"nxkrlgnyhmossxkk\",\"description\":\"h\",\"properties\":{},\"tags\":{}},\"id\":\"xjb\",\"name\":\"hqxvcxgfrpdsofbs\",\"type\":\"rnsvbuswd\"}]}") - .toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ufxqknpirgnepttw", model.nextLink()); - Assertions.assertEquals("lpijnkrxfrd", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerResourceArmPaginatedResult model = - new DataContainerResourceArmPaginatedResult() - .withNextLink("ufxqknpirgnepttw") - .withValue( - Arrays - .asList( - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("lpijnkrxfrd") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true) - .withDataType(DataType.URI_FILE)), - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("h") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)))); - model = BinaryData.fromObject(model).toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ufxqknpirgnepttw", model.nextLink()); - Assertions.assertEquals("lpijnkrxfrd", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c21fbede1d469..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,98 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -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 DataContainersCreateOrUpdateWithResponseMockTests { - @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\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"kc\",\"nextVersion\":\"gzkj\",\"description\":\"qpdwad\",\"properties\":{\"qymjzucwwmejjqhd\":\"ztldsvczdjiah\"},\"tags\":{\"yfozkbnzxbypfqp\":\"mqxiyoo\",\"r\":\"aix\"}},\"id\":\"kkderfrswq\",\"name\":\"kwepwo\",\"type\":\"ggicwnxhtfmcqbs\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = - manager - .dataContainers() - .define("yizwbxgdebxla") - .withExistingWorkspace("ddtgctxegtvgwy", "rbelfnzz") - .withProperties( - new DataContainerProperties() - .withDescription("cpjs") - .withProperties( - mapOf("cucsqsnxfbxu", "em", "su", "eapdrbzyv", "hmhjd", "dulpodkaxpfobk", "eluqr", "lt")) - .withTags(mapOf("srkgz", "dhfztlra", "dbkuwpzqxlcwe", "yh", "qufqizj", "kfecjvxf")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)) - .create(); - - Assertions.assertEquals("qpdwad", response.properties().description()); - Assertions.assertEquals("ztldsvczdjiah", response.properties().properties().get("qymjzucwwmejjqhd")); - Assertions.assertEquals("mqxiyoo", response.properties().tags().get("yfozkbnzxbypfqp")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 3db0566ca853b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 DataContainersDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataContainers().deleteWithResponse("zx", "kn", "fdrld", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java deleted file mode 100644 index 49bf49716b24d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -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 DataContainersGetWithResponseMockTests { - @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\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"zcsozjvxdz\",\"nextVersion\":\"ggbnvtxo\",\"description\":\"alzyxwhoeamo\",\"properties\":{\"fpnimtwuuhaueg\":\"doey\",\"zjy\":\"kwmnfeub\"},\"tags\":{\"nqd\":\"fugiphrrkuu\",\"opueo\":\"rhzz\"}},\"id\":\"svwlujop\",\"name\":\"nibittoztjdqumq\",\"type\":\"fmwc\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = - manager - .dataContainers() - .getWithResponse("yehi", "ittugyu", "wrldax", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("alzyxwhoeamo", response.properties().description()); - Assertions.assertEquals("doey", response.properties().properties().get("fpnimtwuuhaueg")); - Assertions.assertEquals("fugiphrrkuu", response.properties().tags().get("nqd")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java deleted file mode 100644 index de0d56c7ab37e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 DataContainersListMockTests { - @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\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"yeyzm\",\"nextVersion\":\"sqc\",\"description\":\"nxlzbuwodmach\",\"properties\":{\"rmvgoqplehmumkz\":\"nrpb\",\"prwnhkgqggoxsst\":\"llcz\",\"cwmhlymgnukxrk\":\"ivrakfrryn\"},\"tags\":{\"clakku\":\"pequlrlzaudgjtf\",\"toucgj\":\"ddwnhczb\",\"slvlizedvb\":\"irjwayhicqqwwvgw\",\"srgekzyqxadyfhb\":\"abv\"}},\"id\":\"khojqttbspvk\",\"name\":\"glaqjsg\",\"type\":\"zstuj\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .dataContainers() - .list( - "itcdqlhchwhrk", - "jlei", - "ibfiplhxfnsm", - ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nxlzbuwodmach", response.iterator().next().properties().description()); - Assertions.assertEquals("nrpb", response.iterator().next().properties().properties().get("rmvgoqplehmumkz")); - Assertions.assertEquals("pequlrlzaudgjtf", response.iterator().next().properties().tags().get("clakku")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java deleted file mode 100644 index d24b30e51dd2f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataFactory; -import org.junit.jupiter.api.Assertions; - -public final class DataFactoryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataFactory model = - BinaryData - .fromString( - "{\"computeType\":\"DataFactory\",\"computeLocation\":\"anurnnqb\",\"provisioningState\":\"Unknown\",\"description\":\"izxqltgrd\",\"createdOn\":\"2021-08-08T02:29:28Z\",\"modifiedOn\":\"2021-03-28T12:05:51Z\",\"resourceId\":\"x\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}") - .toObject(DataFactory.class); - Assertions.assertEquals("anurnnqb", model.computeLocation()); - Assertions.assertEquals("izxqltgrd", model.description()); - Assertions.assertEquals("x", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataFactory model = - new DataFactory() - .withComputeLocation("anurnnqb") - .withDescription("izxqltgrd") - .withResourceId("x") - .withDisableLocalAuth(false); - model = BinaryData.fromObject(model).toObject(DataFactory.class); - Assertions.assertEquals("anurnnqb", model.computeLocation()); - Assertions.assertEquals("izxqltgrd", model.description()); - Assertions.assertEquals("x", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java deleted file mode 100644 index dd2067f2876c0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = - BinaryData - .fromString("{\"dataLakeStoreAccountName\":\"b\"}") - .toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("b", model.dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = - new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("b"); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("b", model.dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java deleted file mode 100644 index 5529cf53c492c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchema; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchema model = - BinaryData - .fromString("{\"properties\":{\"dataLakeStoreAccountName\":\"mg\"}}") - .toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("mg", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchema model = - new DataLakeAnalyticsSchema() - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("mg")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("mg", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java deleted file mode 100644 index 3f98d4cf05ae7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalytics model = - BinaryData - .fromString( - "{\"computeType\":\"DataLakeAnalytics\",\"properties\":{\"dataLakeStoreAccountName\":\"wrxaomzisg\"},\"computeLocation\":\"rczezkhhlt\",\"provisioningState\":\"Deleting\",\"description\":\"hqo\",\"createdOn\":\"2021-11-21T17:40:44Z\",\"modifiedOn\":\"2021-08-05T21:29:34Z\",\"resourceId\":\"ueayfbpcmsplb\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true}") - .toObject(DataLakeAnalytics.class); - Assertions.assertEquals("rczezkhhlt", model.computeLocation()); - Assertions.assertEquals("hqo", model.description()); - Assertions.assertEquals("ueayfbpcmsplb", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("wrxaomzisg", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalytics model = - new DataLakeAnalytics() - .withComputeLocation("rczezkhhlt") - .withDescription("hqo") - .withResourceId("ueayfbpcmsplb") - .withDisableLocalAuth(true) - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("wrxaomzisg")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalytics.class); - Assertions.assertEquals("rczezkhhlt", model.computeLocation()); - Assertions.assertEquals("hqo", model.description()); - Assertions.assertEquals("ueayfbpcmsplb", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("wrxaomzisg", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java deleted file mode 100644 index 88749f1779a12..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class DataPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataPathAssetReference model = - BinaryData - .fromString( - "{\"referenceType\":\"DataPath\",\"datastoreId\":\"uwxeoiojfizf\",\"path\":\"kjzwfbcyayk\"}") - .toObject(DataPathAssetReference.class); - Assertions.assertEquals("uwxeoiojfizf", model.datastoreId()); - Assertions.assertEquals("kjzwfbcyayk", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataPathAssetReference model = - new DataPathAssetReference().withDatastoreId("uwxeoiojfizf").withPath("kjzwfbcyayk"); - model = BinaryData.fromObject(model).toObject(DataPathAssetReference.class); - Assertions.assertEquals("uwxeoiojfizf", model.datastoreId()); - Assertions.assertEquals("kjzwfbcyayk", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java deleted file mode 100644 index 33fbb9af69258..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"vpkjpr\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"ql\",\"properties\":{\"dshmkxmaehvbbx\":\"gtczheydb\"},\"tags\":{\"kgxywr\":\"pltfnhtba\"}},\"id\":\"pyklyhpluodpvru\",\"name\":\"dlgzibthostgkt\",\"type\":\"tvdxeclzedqb\"}") - .toObject(DataVersionBaseInner.class); - Assertions.assertEquals("ql", model.properties().description()); - Assertions.assertEquals("gtczheydb", model.properties().properties().get("dshmkxmaehvbbx")); - Assertions.assertEquals("pltfnhtba", model.properties().tags().get("kgxywr")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("vpkjpr", model.properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseInner model = - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("ql") - .withProperties(mapOf("dshmkxmaehvbbx", "gtczheydb")) - .withTags(mapOf("kgxywr", "pltfnhtba")) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("vpkjpr")); - model = BinaryData.fromObject(model).toObject(DataVersionBaseInner.class); - Assertions.assertEquals("ql", model.properties().description()); - Assertions.assertEquals("gtczheydb", model.properties().properties().get("dshmkxmaehvbbx")); - Assertions.assertEquals("pltfnhtba", model.properties().tags().get("kgxywr")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("vpkjpr", model.properties().dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java deleted file mode 100644 index 4067e2dd17217..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java +++ /dev/null @@ -1,58 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseProperties model = - BinaryData - .fromString( - "{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"vh\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"dqkdlwwqfbu\",\"properties\":{\"lmbtxhwgfwsrt\":\"xtrqjfs\",\"kh\":\"wcoezbrhub\"},\"tags\":{\"kkqfqjbvle\":\"goo\"}}") - .toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("xtrqjfs", model.properties().get("lmbtxhwgfwsrt")); - Assertions.assertEquals("goo", model.tags().get("kkqfqjbvle")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("vh", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseProperties model = - new DataVersionBaseProperties() - .withDescription("dqkdlwwqfbu") - .withProperties(mapOf("lmbtxhwgfwsrt", "xtrqjfs", "kh", "wcoezbrhub")) - .withTags(mapOf("kkqfqjbvle", "goo")) - .withIsAnonymous(false) - .withIsArchived(true) - .withDataUri("vh"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("xtrqjfs", model.properties().get("lmbtxhwgfwsrt")); - Assertions.assertEquals("goo", model.tags().get("kkqfqjbvle")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("vh", model.dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index c498cc1b9ac60..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"qntcypsxjvfoimwk\",\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rcizjxvyd\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"lhvygdyftu\",\"properties\":{},\"tags\":{}},\"id\":\"nawjslbiwkojgcy\",\"name\":\"tsf\",\"type\":\"z\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"baeqphc\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"pxehuwrykqga\",\"properties\":{},\"tags\":{}},\"id\":\"iklbydvkhb\",\"name\":\"jdz\",\"type\":\"xcv\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"srhnjivo\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"qfzgemjdftul\",\"properties\":{},\"tags\":{}},\"id\":\"ucea\",\"name\":\"tmczuomejwcwwqi\",\"type\":\"knssxmojm\"}]}") - .toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.nextLink()); - Assertions.assertEquals("lhvygdyftu", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model = - new DataVersionBaseResourceArmPaginatedResult() - .withNextLink("qntcypsxjvfoimwk") - .withValue( - Arrays - .asList( - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("lhvygdyftu") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("rcizjxvyd")), - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("pxehuwrykqga") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("baeqphc")), - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("qfzgemjdftul") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("srhnjivo")))); - model = BinaryData.fromObject(model).toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.nextLink()); - Assertions.assertEquals("lhvygdyftu", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 627299b201b6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,107 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -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 DataVersionsCreateOrUpdateWithResponseMockTests { - @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\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"sx\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"orimmo\",\"properties\":{\"kkmvhzfovanyrva\":\"de\",\"ewikfyaqandmym\":\"rtgelg\"},\"tags\":{\"bpbvzopaxmf\":\"qjumovs\",\"faxdtnqifbsa\":\"vsmcwo\"}},\"id\":\"oiauesugmocpcj\",\"name\":\"cboe\",\"type\":\"rgttw\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = - manager - .dataVersions() - .define("qich") - .withExistingData("vdhgjnaqyqip", "lzmvcdsvmwbi", "ekdtfobvfiyb") - .withProperties( - new DataVersionBaseProperties() - .withDescription("ulrqtbht") - .withProperties(mapOf("ryfmxmdu", "pzl", "giln", "zf")) - .withTags( - mapOf( - "qqyeqfcb", - "ccgndjgdprig", - "fsh", - "ulpyuflq", - "klkqnqvkixnmb", - "ujcyohigimwdc", - "zayspzvriet", - "mecuyrzwim")) - .withIsAnonymous(true) - .withIsArchived(true) - .withDataUri("ybfzdqekivycp")) - .create(); - - Assertions.assertEquals("orimmo", response.properties().description()); - Assertions.assertEquals("de", response.properties().properties().get("kkmvhzfovanyrva")); - Assertions.assertEquals("qjumovs", response.properties().tags().get("bpbvzopaxmf")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("sx", response.properties().dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index fe4af1524ea9a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 DataVersionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .dataVersions() - .deleteWithResponse( - "qrxqwqnjx", "dfddtullygtav", "zcxdfweapyfmlxrl", "phraspifleim", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java deleted file mode 100644 index 32ac248ee912f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -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 DataVersionsGetWithResponseMockTests { - @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\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"mtznpaxwfqtyyqi\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"ngbso\",\"properties\":{\"zbkuckgkdsksw\":\"kmii\",\"woykdnonaaxwm\":\"iiqqcqikclsmalns\"},\"tags\":{\"q\":\"ujlqcwnynlle\"}},\"id\":\"bgvsbtsertoxadh\",\"name\":\"uvjhxmnrqstjc\",\"type\":\"etwmlgicvnp\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = - manager - .dataVersions() - .getWithResponse("x", "mdbgi", "ehfgsm", "rjuqbpxtokl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ngbso", response.properties().description()); - Assertions.assertEquals("kmii", response.properties().properties().get("zbkuckgkdsksw")); - Assertions.assertEquals("ujlqcwnynlle", response.properties().tags().get("q")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("mtznpaxwfqtyyqi", response.properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java deleted file mode 100644 index f5a6b45c3561c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 DataVersionsListMockTests { - @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\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"pjyyqmkwlhvc\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"jk\",\"properties\":{\"uzmsxgam\":\"xrwzo\"},\"tags\":{\"j\":\"kwppthuzdprmimr\",\"xyemhkft\":\"poq\",\"tecloamfmxtll\":\"aew\"}},\"id\":\"tymqcnrrfijhggab\",\"name\":\"bgamklilirwd\",\"type\":\"ffhsdpzouhk\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .dataVersions() - .list( - "d", - "pgchzpgfqum", - "djxh", - "ghgodkynrceq", - 233157705, - "fdbdfmmxj", - "naj", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jk", response.iterator().next().properties().description()); - Assertions.assertEquals("xrwzo", response.iterator().next().properties().properties().get("uzmsxgam")); - Assertions.assertEquals("kwppthuzdprmimr", response.iterator().next().properties().tags().get("j")); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("pjyyqmkwlhvc", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java deleted file mode 100644 index 3716ec3a07fac..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,57 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"fmluiqtqzfavyvn\",\"value\":[{\"properties\":{\"datastoreType\":\"DatastoreProperties\",\"isDefault\":false,\"description\":\"yeua\",\"properties\":{},\"tags\":{}},\"id\":\"abqgzslesjcbh\",\"name\":\"rnntiewdjcv\",\"type\":\"quwrbehwag\"}]}") - .toObject(DatastoreResourceArmPaginatedResult.class); - Assertions.assertEquals("fmluiqtqzfavyvn", model.nextLink()); - Assertions.assertEquals("yeua", model.value().get(0).properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreResourceArmPaginatedResult model = - new DatastoreResourceArmPaginatedResult() - .withNextLink("fmluiqtqzfavyvn") - .withValue( - Arrays - .asList( - new DatastoreInner() - .withProperties( - new DatastoreProperties() - .withDescription("yeua") - .withProperties(mapOf()) - .withTags(mapOf())))); - model = BinaryData.fromObject(model).toObject(DatastoreResourceArmPaginatedResult.class); - Assertions.assertEquals("fmluiqtqzfavyvn", model.nextLink()); - Assertions.assertEquals("yeua", model.value().get(0).properties().description()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java deleted file mode 100644 index 0fdbce8dfb9d3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 DatastoresDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .datastores() - .deleteWithResponse("bp", "nupoyryefqmwovyz", "xlnomfpbjcee", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java deleted file mode 100644 index 6aebf34094fec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; - -public final class DefaultScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultScaleSettings model = - BinaryData.fromString("{\"scaleType\":\"Default\"}").toObject(DefaultScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultScaleSettings model = new DefaultScaleSettings(); - model = BinaryData.fromObject(model).toObject(DefaultScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java deleted file mode 100644 index 97597fc5b2a11..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsInner model = - BinaryData.fromString("{\"content\":\"jcxcjxgrytfmpcyc\"}").toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jcxcjxgrytfmpcyc", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsInner model = new DeploymentLogsInner().withContent("jcxcjxgrytfmpcyc"); - model = BinaryData.fromObject(model).toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jcxcjxgrytfmpcyc", model.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java deleted file mode 100644 index 82ee2e9d4bd43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsRequest model = - BinaryData - .fromString("{\"containerType\":\"StorageInitializer\",\"tail\":304740778}") - .toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.STORAGE_INITIALIZER, model.containerType()); - Assertions.assertEquals(304740778, model.tail()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsRequest model = - new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(304740778); - model = BinaryData.fromObject(model).toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.STORAGE_INITIALIZER, model.containerType()); - Assertions.assertEquals(304740778, model.tail()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java deleted file mode 100644 index ec591bc0c0ab7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java +++ /dev/null @@ -1,47 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentResourceConfiguration model = - BinaryData - .fromString( - "{\"instanceCount\":1806206586,\"instanceType\":\"dcfhucqdpf\",\"properties\":{\"vudutncor\":\"datalsbjjcanvxbv\",\"xqtvcofu\":\"datar\"}}") - .toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1806206586, model.instanceCount()); - Assertions.assertEquals("dcfhucqdpf", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentResourceConfiguration model = - new DeploymentResourceConfiguration() - .withInstanceCount(1806206586) - .withInstanceType("dcfhucqdpf") - .withProperties(mapOf("vudutncor", "datalsbjjcanvxbv", "xqtvcofu", "datar")); - model = BinaryData.fromObject(model).toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1806206586, model.instanceCount()); - Assertions.assertEquals("dcfhucqdpf", model.instanceType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java deleted file mode 100644 index 79a8c8e054660..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DistributionConfiguration; - -public final class DistributionConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DistributionConfiguration model = - BinaryData - .fromString("{\"distributionType\":\"DistributionConfiguration\"}") - .toObject(DistributionConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DistributionConfiguration model = new DistributionConfiguration(); - model = BinaryData.fromObject(model).toObject(DistributionConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java deleted file mode 100644 index 48a697c830af2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import org.junit.jupiter.api.Assertions; - -public final class EarlyTerminationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EarlyTerminationPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1491450827,\"evaluationInterval\":935954000}") - .toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1491450827, model.delayEvaluation()); - Assertions.assertEquals(935954000, model.evaluationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EarlyTerminationPolicy model = - new EarlyTerminationPolicy().withDelayEvaluation(1491450827).withEvaluationInterval(935954000); - model = BinaryData.fromObject(model).toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1491450827, model.delayEvaluation()); - Assertions.assertEquals(935954000, model.evaluationInterval()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java deleted file mode 100644 index b2079ae77443a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction; - -public final class EndpointScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointScheduleAction model = - BinaryData - .fromString("{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"datamfzsbf\"}") - .toObject(EndpointScheduleAction.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointScheduleAction model = new EndpointScheduleAction().withEndpointInvocationDefinition("datamfzsbf"); - model = BinaryData.fromObject(model).toObject(EndpointScheduleAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java deleted file mode 100644 index 876683c15f202..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java +++ /dev/null @@ -1,56 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"ulfgslqu\",\"nextVersion\":\"wdlenrdsut\",\"description\":\"bazpjuohmi\",\"properties\":{\"wpklvxw\":\"lnorwmdu\",\"epn\":\"ygdxpgpqchis\",\"fozauorsuk\":\"bjcrxgibbdaxco\"},\"tags\":{\"vnuuepzl\":\"bqplh\",\"vmnnrw\":\"phwzsoldweyuqdu\"}},\"id\":\"i\",\"name\":\"rk\",\"type\":\"alywjhhgdn\"}") - .toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("bazpjuohmi", model.properties().description()); - Assertions.assertEquals("lnorwmdu", model.properties().properties().get("wpklvxw")); - Assertions.assertEquals("bqplh", model.properties().tags().get("vnuuepzl")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerInner model = - new EnvironmentContainerInner() - .withProperties( - new EnvironmentContainerProperties() - .withDescription("bazpjuohmi") - .withProperties( - mapOf("wpklvxw", "lnorwmdu", "epn", "ygdxpgpqchis", "fozauorsuk", "bjcrxgibbdaxco")) - .withTags(mapOf("vnuuepzl", "bqplh", "vmnnrw", "phwzsoldweyuqdu")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("bazpjuohmi", model.properties().description()); - Assertions.assertEquals("lnorwmdu", model.properties().properties().get("wpklvxw")); - Assertions.assertEquals("bqplh", model.properties().tags().get("vnuuepzl")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java deleted file mode 100644 index db15e9292ceee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"ivfomiloxgg\",\"nextVersion\":\"fi\",\"description\":\"dieuzaofj\",\"properties\":{\"ubiipuipwoqonma\":\"cyyysfgdot\"},\"tags\":{\"izsh\":\"k\"}}") - .toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("dieuzaofj", model.description()); - Assertions.assertEquals("cyyysfgdot", model.properties().get("ubiipuipwoqonma")); - Assertions.assertEquals("k", model.tags().get("izsh")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerProperties model = - new EnvironmentContainerProperties() - .withDescription("dieuzaofj") - .withProperties(mapOf("ubiipuipwoqonma", "cyyysfgdot")) - .withTags(mapOf("izsh", "k")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("dieuzaofj", model.description()); - Assertions.assertEquals("cyyysfgdot", model.properties().get("ubiipuipwoqonma")); - Assertions.assertEquals("k", model.tags().get("izsh")); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index f52bf87e95c97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,60 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"buffkmrqemvvhm\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"utacoe\",\"nextVersion\":\"vewzcj\",\"description\":\"m\",\"properties\":{},\"tags\":{}},\"id\":\"guaadraufactkahz\",\"name\":\"v\",\"type\":\"jjziuxxpsh\"}]}") - .toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("buffkmrqemvvhm", model.nextLink()); - Assertions.assertEquals("m", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model = - new EnvironmentContainerResourceArmPaginatedResult() - .withNextLink("buffkmrqemvvhm") - .withValue( - Arrays - .asList( - new EnvironmentContainerInner() - .withProperties( - new EnvironmentContainerProperties() - .withDescription("m") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)))); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("buffkmrqemvvhm", model.nextLink()); - Assertions.assertEquals("m", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2b0670da2c8be..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,103 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -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 EnvironmentContainersCreateOrUpdateWithResponseMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"jenvjeateaxx\",\"nextVersion\":\"xoxdjxldnaryyi\",\"description\":\"kd\",\"properties\":{\"zaledoyqxlunkf\":\"ndwdbvx\",\"oanpohrvm\":\"hmcxqqxmyzkl\",\"a\":\"rqra\",\"k\":\"ivznllas\"},\"tags\":{\"aihxjtgzgtaiywbq\":\"jqjpv\",\"mhljqlxspm\":\"roigbsfsgsaenwld\"}},\"id\":\"ctr\",\"name\":\"ldsxebuhsxrz\",\"type\":\"mgsdaluyckhefrbh\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = - manager - .environmentContainers() - .define("vsolzwil") - .withExistingWorkspace("dofuckclb", "xlu") - .withProperties( - new EnvironmentContainerProperties() - .withDescription("dkktpmbmxbmbrwgz") - .withProperties(mapOf("hxsdplaumydmhwe", "jb", "xydgtokvqbvwg", "jf", "lhpses", "gwzpvxak")) - .withTags( - mapOf( - "goqg", - "amqiydvxcgdhy", - "spglq", - "oyqyxyjrcbqpb", - "tdahneaoovtyjzti", - "o", - "ekfsrm", - "fwjlof")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("kd", response.properties().description()); - Assertions.assertEquals("ndwdbvx", response.properties().properties().get("zaledoyqxlunkf")); - Assertions.assertEquals("jqjpv", response.properties().tags().get("aihxjtgzgtaiywbq")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 4fe0f354d62e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 EnvironmentContainersDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .environmentContainers() - .deleteWithResponse("d", "fa", "rptvcshtkutzcttb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java deleted file mode 100644 index b4f4b37be1a2a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -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 EnvironmentContainersGetWithResponseMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"jirmuydgfttm\",\"nextVersion\":\"fgeoagfuoftnx\",\"description\":\"wxmdaj\",\"properties\":{\"gsevmdm\":\"g\",\"zljdnci\":\"enlrstgf\"},\"tags\":{\"cvucgytoxu\":\"vamyyznmrgcdo\",\"qmebgszplusdekpd\":\"httnzqs\",\"ssgpgvo\":\"z\",\"cwztlvvws\":\"yejidbdqzsqun\"}},\"id\":\"rkky\",\"name\":\"trepw\",\"type\":\"wfkcauxuvavcpf\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = - manager - .environmentContainers() - .getWithResponse("gdirda", "m", "zjgcfjfx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wxmdaj", response.properties().description()); - Assertions.assertEquals("g", response.properties().properties().get("gsevmdm")); - Assertions.assertEquals("vamyyznmrgcdo", response.properties().tags().get("cvucgytoxu")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java deleted file mode 100644 index 8be28b3cf8d39..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java +++ /dev/null @@ -1,79 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 EnvironmentContainersListMockTests { - @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\":{\"isArchived\":false,\"latestVersion\":\"ipsdudgcozzomehx\",\"nextVersion\":\"ntolamlb\",\"description\":\"uxkqllczipvwdt\",\"properties\":{\"kwx\":\"zdqiqdlrat\",\"lhpryjfzihuio\":\"auwxsuykznhrfgsl\",\"pajtfeyvkbd\":\"eo\",\"rhd\":\"dd\"},\"tags\":{\"zytijcx\":\"beuuqutkzwtjwwg\",\"qkkkbjuckcatuqbh\":\"nondegjdyd\"}},\"id\":\"wcnxtpzdlyseid\",\"name\":\"oa\",\"type\":\"atprytgrhzbq\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .environmentContainers() - .list( - "ddnvovbooqbmdq", - "xyglaetscflw", - "jdtlriefooyycux", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uxkqllczipvwdt", response.iterator().next().properties().description()); - Assertions.assertEquals("zdqiqdlrat", response.iterator().next().properties().properties().get("kwx")); - Assertions.assertEquals("beuuqutkzwtjwwg", response.iterator().next().properties().tags().get("zytijcx")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java deleted file mode 100644 index a0f3ff3557bd1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"vizqzdwl\",\"dockerfilePath\":\"lyoupfgfbkju\"},\"condaFile\":\"yhgk\",\"environmentType\":\"Curated\",\"image\":\"sgow\",\"inferenceConfig\":{},\"osType\":\"Linux\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"bqactxtgzukx\",\"properties\":{\"tg\":\"m\",\"isavok\":\"qqxhrnxrxcpj\",\"azivjlfrqttbajl\":\"dzf\"},\"tags\":{\"dkqqfkuvscxkd\":\"nwxyiop\",\"oaz\":\"ligovibrxkpm\"}},\"id\":\"u\",\"name\":\"cbgoor\",\"type\":\"te\"}") - .toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("bqactxtgzukx", model.properties().description()); - Assertions.assertEquals("m", model.properties().properties().get("tg")); - Assertions.assertEquals("nwxyiop", model.properties().tags().get("dkqqfkuvscxkd")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("vizqzdwl", model.properties().build().contextUri()); - Assertions.assertEquals("lyoupfgfbkju", model.properties().build().dockerfilePath()); - Assertions.assertEquals("yhgk", model.properties().condaFile()); - Assertions.assertEquals("sgow", model.properties().image()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionInner model = - new EnvironmentVersionInner() - .withProperties( - new EnvironmentVersionProperties() - .withDescription("bqactxtgzukx") - .withProperties(mapOf("tg", "m", "isavok", "qqxhrnxrxcpj", "azivjlfrqttbajl", "dzf")) - .withTags(mapOf("dkqqfkuvscxkd", "nwxyiop", "oaz", "ligovibrxkpm")) - .withIsAnonymous(false) - .withIsArchived(true) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("vizqzdwl").withDockerfilePath("lyoupfgfbkju")) - .withCondaFile("yhgk") - .withImage("sgow") - .withInferenceConfig(new InferenceContainerProperties()) - .withOsType(OperatingSystemType.LINUX)); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("bqactxtgzukx", model.properties().description()); - Assertions.assertEquals("m", model.properties().properties().get("tg")); - Assertions.assertEquals("nwxyiop", model.properties().tags().get("dkqqfkuvscxkd")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("vizqzdwl", model.properties().build().contextUri()); - Assertions.assertEquals("lyoupfgfbkju", model.properties().build().dockerfilePath()); - Assertions.assertEquals("yhgk", model.properties().condaFile()); - Assertions.assertEquals("sgow", model.properties().image()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java deleted file mode 100644 index 8e545095d6971..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionProperties model = - BinaryData - .fromString( - "{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"hjxa\",\"dockerfilePath\":\"vjgsl\"},\"condaFile\":\"dilmyww\",\"environmentType\":\"UserCreated\",\"image\":\"xnyed\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"yvudtjuewbci\",\"port\":1871891438},\"readinessRoute\":{\"path\":\"uwhcjyxccybv\",\"port\":436827826},\"scoringRoute\":{\"path\":\"akkud\",\"port\":417091375}},\"osType\":\"Linux\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"agst\",\"properties\":{\"gsj\":\"hpfkyrkdbdgi\",\"obaiyhddviaceg\":\"mnwqj\",\"ntfpmvmemfnc\":\"n\",\"xlllchp\":\"dwvvba\"},\"tags\":{\"jcswsmys\":\"zevwrdnhfukuv\",\"lerchpq\":\"uluqypfc\"}}") - .toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("agst", model.description()); - Assertions.assertEquals("hpfkyrkdbdgi", model.properties().get("gsj")); - Assertions.assertEquals("zevwrdnhfukuv", model.tags().get("jcswsmys")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.autoRebuild()); - Assertions.assertEquals("hjxa", model.build().contextUri()); - Assertions.assertEquals("vjgsl", model.build().dockerfilePath()); - Assertions.assertEquals("dilmyww", model.condaFile()); - Assertions.assertEquals("xnyed", model.image()); - Assertions.assertEquals("yvudtjuewbci", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1871891438, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("uwhcjyxccybv", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(436827826, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("akkud", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(417091375, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionProperties model = - new EnvironmentVersionProperties() - .withDescription("agst") - .withProperties( - mapOf("gsj", "hpfkyrkdbdgi", "obaiyhddviaceg", "mnwqj", "ntfpmvmemfnc", "n", "xlllchp", "dwvvba")) - .withTags(mapOf("jcswsmys", "zevwrdnhfukuv", "lerchpq", "uluqypfc")) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("hjxa").withDockerfilePath("vjgsl")) - .withCondaFile("dilmyww") - .withImage("xnyed") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("yvudtjuewbci").withPort(1871891438)) - .withReadinessRoute(new Route().withPath("uwhcjyxccybv").withPort(436827826)) - .withScoringRoute(new Route().withPath("akkud").withPort(417091375))) - .withOsType(OperatingSystemType.LINUX); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("agst", model.description()); - Assertions.assertEquals("hpfkyrkdbdgi", model.properties().get("gsj")); - Assertions.assertEquals("zevwrdnhfukuv", model.tags().get("jcswsmys")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.autoRebuild()); - Assertions.assertEquals("hjxa", model.build().contextUri()); - Assertions.assertEquals("vjgsl", model.build().dockerfilePath()); - Assertions.assertEquals("dilmyww", model.condaFile()); - Assertions.assertEquals("xnyed", model.image()); - Assertions.assertEquals("yvudtjuewbci", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1871891438, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("uwhcjyxccybv", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(436827826, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("akkud", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(417091375, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 7d0ac414f67a7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"cimpevfg\",\"value\":[{\"properties\":{\"autoRebuild\":\"Disabled\",\"condaFile\":\"bywdxsmicc\",\"environmentType\":\"Curated\",\"image\":\"scjfnyns\",\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"qytibyowbblgyavu\",\"properties\":{},\"tags\":{}},\"id\":\"joxoism\",\"name\":\"ksbpimlqoljx\",\"type\":\"cgxxlxs\"}]}") - .toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("cimpevfg", model.nextLink()); - Assertions.assertEquals("qytibyowbblgyavu", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("bywdxsmicc", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("scjfnyns", model.value().get(0).properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = - new EnvironmentVersionResourceArmPaginatedResult() - .withNextLink("cimpevfg") - .withValue( - Arrays - .asList( - new EnvironmentVersionInner() - .withProperties( - new EnvironmentVersionProperties() - .withDescription("qytibyowbblgyavu") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withCondaFile("bywdxsmicc") - .withImage("scjfnyns") - .withOsType(OperatingSystemType.WINDOWS)))); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("cimpevfg", model.nextLink()); - Assertions.assertEquals("qytibyowbblgyavu", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("bywdxsmicc", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("scjfnyns", model.value().get(0).properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 301d807f7f9ce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,121 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -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 EnvironmentVersionsCreateOrUpdateWithResponseMockTests { - @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\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"bkfukdljq\",\"dockerfilePath\":\"tsdyds\"},\"condaFile\":\"pafyalo\",\"environmentType\":\"Curated\",\"image\":\"izzn\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"fyjfd\",\"properties\":{\"qh\":\"yvndjokgwesym\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\",\"bcpr\":\"bkbpjzobd\"},\"tags\":{\"awp\":\"kuhydtnaczkfwfat\"}},\"id\":\"skivdwgtqcu\",\"name\":\"ecsaaqgoqbdiu\",\"type\":\"csbskowkrbh\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = - manager - .environmentVersions() - .define("wrqkza") - .withExistingEnvironment("h", "gsiqikvllr", "tpmglxkoikmtr") - .withProperties( - new EnvironmentVersionProperties() - .withDescription("sbvvdlsflxkqesdf") - .withProperties(mapOf("dklt", "bgzancoinmphymcq", "toj", "dhqnufbxweiib")) - .withTags( - mapOf( - "uaorhjk", - "nybydhuihaouwud", - "amqprlo", - "hwvumosqir", - "zcmtagelajdyolj", - "rugejcvjkjy", - "qfmzsizzhravrc", - "qy")) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("mpa").withDockerfilePath("wzlweeprn")) - .withCondaFile("zltkaszfj") - .withImage("bduxapgrcq") - .withInferenceConfig(new InferenceContainerProperties()) - .withOsType(OperatingSystemType.WINDOWS)) - .create(); - - Assertions.assertEquals("fyjfd", response.properties().description()); - Assertions.assertEquals("yvndjokgwesym", response.properties().properties().get("qh")); - Assertions.assertEquals("kuhydtnaczkfwfat", response.properties().tags().get("awp")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("bkfukdljq", response.properties().build().contextUri()); - Assertions.assertEquals("tsdyds", response.properties().build().dockerfilePath()); - Assertions.assertEquals("pafyalo", response.properties().condaFile()); - Assertions.assertEquals("izzn", response.properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 59dc400d4ad1e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 EnvironmentVersionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .environmentVersions() - .deleteWithResponse("hpyvdkgdet", "z", "canzb", "ekwuyckyvn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 9af7a5f2564ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -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 EnvironmentVersionsGetWithResponseMockTests { - @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\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"siecktybhj\",\"dockerfilePath\":\"idhhxomild\"},\"condaFile\":\"jxdugxwj\",\"environmentType\":\"Curated\",\"image\":\"qrslaate\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"wlxrhgt\",\"properties\":{\"korvvm\":\"tqqykbkkteozejog\",\"h\":\"mcofn\"},\"tags\":{\"li\":\"nosn\",\"z\":\"k\",\"etyalht\":\"j\",\"ttcucrcm\":\"mknazgbjbhrpgiq\"}},\"id\":\"ixpqj\",\"name\":\"wifhbksldttohq\",\"type\":\"lna\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = - manager - .environmentVersions() - .getWithResponse("nsm", "ffiwjbctvbp", "ujqjtotdxp", "scsl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wlxrhgt", response.properties().description()); - Assertions.assertEquals("tqqykbkkteozejog", response.properties().properties().get("korvvm")); - Assertions.assertEquals("nosn", response.properties().tags().get("li")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("siecktybhj", response.properties().build().contextUri()); - Assertions.assertEquals("idhhxomild", response.properties().build().dockerfilePath()); - Assertions.assertEquals("jxdugxwj", response.properties().condaFile()); - Assertions.assertEquals("qrslaate", response.properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java deleted file mode 100644 index bb4f62f6016d0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java +++ /dev/null @@ -1,93 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -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 EnvironmentVersionsListMockTests { - @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\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"yljurkeposehqqyl\",\"dockerfilePath\":\"ctwjwdsdlzm\"},\"condaFile\":\"erxxxoteehkhowgo\",\"environmentType\":\"UserCreated\",\"image\":\"xowpcbapn\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"fey\",\"properties\":{\"jnmzp\":\"ocvvujexayglxrk\",\"ieidzlv\":\"slavxjfiuof\",\"ydv\":\"sqywjopacky\",\"izwgsoriobijeiyd\":\"kmfngpmillxgjs\"},\"tags\":{\"ybriop\":\"ynhbokayrg\",\"igsioctqkm\":\"weoftnorw\",\"xvzfffhtjnwos\":\"ja\",\"zqfcwrriomxee\":\"tfjxtvlx\"}},\"id\":\"yhjm\",\"name\":\"jiqegmxdbs\",\"type\":\"hc\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .environmentVersions() - .list( - "eu", - "rbgpxeb", - "ludca", - "tujraxdtpryjm", - 1855345037, - "nsewouxl", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fey", response.iterator().next().properties().description()); - Assertions.assertEquals("ocvvujexayglxrk", response.iterator().next().properties().properties().get("jnmzp")); - Assertions.assertEquals("ynhbokayrg", response.iterator().next().properties().tags().get("ybriop")); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions - .assertEquals( - AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("yljurkeposehqqyl", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("ctwjwdsdlzm", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals("erxxxoteehkhowgo", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("xowpcbapn", response.iterator().next().properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.iterator().next().properties().osType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java deleted file mode 100644 index 74cbfb4f49607..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPriceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrice model = - BinaryData - .fromString("{\"retailPrice\":57.931778810567735,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}") - .toObject(EstimatedVMPrice.class); - Assertions.assertEquals(57.931778810567735, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrice model = - new EstimatedVMPrice() - .withRetailPrice(57.931778810567735) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrice.class); - Assertions.assertEquals(57.931778810567735, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java deleted file mode 100644 index 5af3ad025fa0c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPricesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrices model = - BinaryData - .fromString( - "{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":45.736942050047844,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]}") - .toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(45.736942050047844, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.values().get(0).vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrices model = - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues( - Arrays - .asList( - new EstimatedVMPrice() - .withRetailPrice(45.736942050047844) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY))); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(45.736942050047844, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.values().get(0).vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java deleted file mode 100644 index a75cd9b0fcc19..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java +++ /dev/null @@ -1,45 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalFqdnResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalFqdnResponseInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"category\":\"jflcxog\",\"endpoints\":[]}},{\"properties\":{\"category\":\"nzmnsikvm\",\"endpoints\":[]}}]}") - .toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("jflcxog", model.value().get(0).properties().category()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalFqdnResponseInner model = - new ExternalFqdnResponseInner() - .withValue( - Arrays - .asList( - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("jflcxog") - .withEndpoints(Arrays.asList())), - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("nzmnsikvm") - .withEndpoints(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("jflcxog", model.value().get(0).properties().category()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java deleted file mode 100644 index f57fccd72e815..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturizationSettings model = - BinaryData.fromString("{\"datasetLanguage\":\"hwtbbaedorvvm\"}").toObject(FeaturizationSettings.class); - Assertions.assertEquals("hwtbbaedorvvm", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("hwtbbaedorvvm"); - model = BinaryData.fromObject(model).toObject(FeaturizationSettings.class); - Assertions.assertEquals("hwtbbaedorvvm", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java deleted file mode 100644 index 11c126dd5b978..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlavorDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlavorData model = - BinaryData - .fromString( - "{\"data\":{\"sdbccxjmonfdgnwn\":\"bdkelvidizo\",\"keifzzhmkdasv\":\"ypuuwwltvuqjctze\",\"cu\":\"lyhb\"}}") - .toObject(FlavorData.class); - Assertions.assertEquals("bdkelvidizo", model.data().get("sdbccxjmonfdgnwn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlavorData model = - new FlavorData() - .withData(mapOf("sdbccxjmonfdgnwn", "bdkelvidizo", "keifzzhmkdasv", "ypuuwwltvuqjctze", "cu", "lyhb")); - model = BinaryData.fromObject(model).toObject(FlavorData.class); - Assertions.assertEquals("bdkelvidizo", model.data().get("sdbccxjmonfdgnwn")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java deleted file mode 100644 index ba53d60d641c0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; - -public final class ForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastHorizon model = BinaryData.fromString("{\"mode\":\"ForecastHorizon\"}").toObject(ForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastHorizon model = new ForecastHorizon(); - model = BinaryData.fromObject(model).toObject(ForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java deleted file mode 100644 index bafd52e7516cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingSettings model = - BinaryData - .fromString( - "{\"countryOrRegionForHolidays\":\"thuqolyahluq\",\"cvStepSize\":608197313,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"rjb\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"None\",\"targetAggregateFunction\":\"None\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"zvqqugdrftbcvexr\",\"timeSeriesIdColumnNames\":[\"uowtljvfwhrea\",\"khyxvrqtvbcz\",\"ulmdgglm\",\"pjpfseykgs\"],\"useStl\":\"Season\"}") - .toObject(ForecastingSettings.class); - Assertions.assertEquals("thuqolyahluq", model.countryOrRegionForHolidays()); - Assertions.assertEquals(608197313, model.cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); - Assertions.assertEquals("rjb", model.frequency()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.NONE, model.targetAggregateFunction()); - Assertions.assertEquals("zvqqugdrftbcvexr", model.timeColumnName()); - Assertions.assertEquals("uowtljvfwhrea", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.SEASON, model.useStl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingSettings model = - new ForecastingSettings() - .withCountryOrRegionForHolidays("thuqolyahluq") - .withCvStepSize(608197313) - .withFeatureLags(FeatureLags.AUTO) - .withForecastHorizon(new ForecastHorizon()) - .withFrequency("rjb") - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.NONE) - .withTargetAggregateFunction(TargetAggregationFunction.NONE) - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withTimeColumnName("zvqqugdrftbcvexr") - .withTimeSeriesIdColumnNames(Arrays.asList("uowtljvfwhrea", "khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs")) - .withUseStl(UseStl.SEASON); - model = BinaryData.fromObject(model).toObject(ForecastingSettings.class); - Assertions.assertEquals("thuqolyahluq", model.countryOrRegionForHolidays()); - Assertions.assertEquals(608197313, model.cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); - Assertions.assertEquals("rjb", model.frequency()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.NONE, model.targetAggregateFunction()); - Assertions.assertEquals("zvqqugdrftbcvexr", model.timeColumnName()); - Assertions.assertEquals("uowtljvfwhrea", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.SEASON, model.useStl()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java deleted file mode 100644 index 3a4e3ae50a89e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java +++ /dev/null @@ -1,268 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.Forecasting; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Forecasting model = - BinaryData - .fromString( - "{\"taskType\":\"Forecasting\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"zxmdew\",\"cvStepSize\":1373177035,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"lbjazejww\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Pad\",\"targetAggregateFunction\":\"Min\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"brnnhjxsqw\",\"timeSeriesIdColumnNames\":[\"kbiwetpozyc\",\"qiqyhgfsetzlexbs\"],\"useStl\":\"None\"},\"primaryMetric\":\"R2Score\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"GradientBoosting\",\"SeasonalNaive\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"Arimax\",\"Arimax\",\"Prophet\"],\"enableDnnTraining\":true,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT225H4M15S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datalpkpbafvafhl\",\"stackMetaLearnerTrainPercentage\":11.719010334787338,\"stackMetaLearnerType\":\"ElasticNet\"}},\"cvSplitColumnNames\":[\"xrhyzdfwrsofplt\"],\"featurizationSettings\":{\"blockedTransformers\":[\"WordEmbedding\",\"TextTargetEncoder\",\"TfIdf\",\"TfIdf\"],\"columnNameAndTypes\":{\"npq\":\"fnrac\",\"uuj\":\"g\"},\"enableDnnFeaturization\":false,\"mode\":\"Auto\",\"transformerParams\":{\"igrb\":[],\"xsjybvitvqk\":[],\"az\":[]},\"datasetLanguage\":\"mtggmu\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":73.03774094829895,\"maxConcurrentTrials\":1401154430,\"maxCoresPerTrial\":737761166,\"maxTrials\":273920655,\"timeout\":\"PT29H11M39S\",\"trialTimeout\":\"PT238H15M11S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"voaiknaqlnuw\",\"description\":\"uyxlykwphvxzcw\"},\"testDataSize\":14.530784309792832,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"lkexaonwivkcqh\",\"description\":\"hxknlccrmmkyupi\"},\"validationDataSize\":89.69731810693186,\"weightColumnName\":\"jfkakfqfrke\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"dudxjascowvfdjk\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"phlkksnm\",\"description\":\"vyfijdkzuqnw\"}}") - .toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("dudxjascowvfdjk", model.targetColumnName()); - Assertions.assertEquals("vyfijdkzuqnw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("phlkksnm", model.trainingData().uri()); - Assertions.assertEquals("zxmdew", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals(1373177035, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); - Assertions.assertEquals("lbjazejww", model.forecastingSettings().frequency()); - Assertions - .assertEquals( - ShortSeriesHandlingConfiguration.PAD, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.MIN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals("brnnhjxsqw", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("kbiwetpozyc", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(ForecastingPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT225H4M15S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 11.719010334787338D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ForecastingModels.GRADIENT_BOOSTING, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals(ForecastingModels.RANDOM_FOREST, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("xrhyzdfwrsofplt", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mtggmu", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WORD_EMBEDDING, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("fnrac", model.featurizationSettings().columnNameAndTypes().get("npq")); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(73.03774094829895D, model.limitSettings().exitScore()); - Assertions.assertEquals(1401154430, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(737761166, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(273920655, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H11M39S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT238H15M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("uyxlykwphvxzcw", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("voaiknaqlnuw", model.testData().uri()); - Assertions.assertEquals(14.530784309792832D, model.testDataSize()); - Assertions.assertEquals("hxknlccrmmkyupi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("lkexaonwivkcqh", model.validationData().uri()); - Assertions.assertEquals(89.69731810693186D, model.validationDataSize()); - Assertions.assertEquals("jfkakfqfrke", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Forecasting model = - new Forecasting() - .withLogVerbosity(LogVerbosity.ERROR) - .withTargetColumnName("dudxjascowvfdjk") - .withTrainingData( - new MLTableJobInput() - .withDescription("vyfijdkzuqnw") - .withMode(InputDeliveryMode.DIRECT) - .withUri("phlkksnm")) - .withForecastingSettings( - new ForecastingSettings() - .withCountryOrRegionForHolidays("zxmdew") - .withCvStepSize(1373177035) - .withFeatureLags(FeatureLags.AUTO) - .withForecastHorizon(new ForecastHorizon()) - .withFrequency("lbjazejww") - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.PAD) - .withTargetAggregateFunction(TargetAggregationFunction.MIN) - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withTimeColumnName("brnnhjxsqw") - .withTimeSeriesIdColumnNames(Arrays.asList("kbiwetpozyc", "qiqyhgfsetzlexbs")) - .withUseStl(UseStl.NONE)) - .withPrimaryMetric(ForecastingPrimaryMetrics.R2SCORE) - .withTrainingSettings( - new ForecastingTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT225H4M15S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datalpkpbafvafhl") - .withStackMetaLearnerTrainPercentage(11.719010334787338D) - .withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET)) - .withAllowedTrainingAlgorithms( - Arrays.asList(ForecastingModels.GRADIENT_BOOSTING, ForecastingModels.SEASONAL_NAIVE)) - .withBlockedTrainingAlgorithms( - Arrays - .asList( - ForecastingModels.RANDOM_FOREST, - ForecastingModels.ARIMAX, - ForecastingModels.ARIMAX, - ForecastingModels.PROPHET))) - .withCvSplitColumnNames(Arrays.asList("xrhyzdfwrsofplt")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("mtggmu") - .withBlockedTransformers( - Arrays - .asList( - BlockedTransformers.WORD_EMBEDDING, - BlockedTransformers.TEXT_TARGET_ENCODER, - BlockedTransformers.TF_IDF, - BlockedTransformers.TF_IDF)) - .withColumnNameAndTypes(mapOf("npq", "fnrac", "uuj", "g")) - .withEnableDnnFeaturization(false) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams( - mapOf("igrb", Arrays.asList(), "xsjybvitvqk", Arrays.asList(), "az", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(73.03774094829895D) - .withMaxConcurrentTrials(1401154430) - .withMaxCoresPerTrial(737761166) - .withMaxTrials(273920655) - .withTimeout(Duration.parse("PT29H11M39S")) - .withTrialTimeout(Duration.parse("PT238H15M11S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("uyxlykwphvxzcw") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("voaiknaqlnuw")) - .withTestDataSize(14.530784309792832D) - .withValidationData( - new MLTableJobInput() - .withDescription("hxknlccrmmkyupi") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("lkexaonwivkcqh")) - .withValidationDataSize(89.69731810693186D) - .withWeightColumnName("jfkakfqfrke"); - model = BinaryData.fromObject(model).toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("dudxjascowvfdjk", model.targetColumnName()); - Assertions.assertEquals("vyfijdkzuqnw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("phlkksnm", model.trainingData().uri()); - Assertions.assertEquals("zxmdew", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals(1373177035, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); - Assertions.assertEquals("lbjazejww", model.forecastingSettings().frequency()); - Assertions - .assertEquals( - ShortSeriesHandlingConfiguration.PAD, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.MIN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals("brnnhjxsqw", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("kbiwetpozyc", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(ForecastingPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT225H4M15S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 11.719010334787338D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ForecastingModels.GRADIENT_BOOSTING, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals(ForecastingModels.RANDOM_FOREST, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("xrhyzdfwrsofplt", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mtggmu", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WORD_EMBEDDING, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("fnrac", model.featurizationSettings().columnNameAndTypes().get("npq")); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(73.03774094829895D, model.limitSettings().exitScore()); - Assertions.assertEquals(1401154430, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(737761166, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(273920655, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H11M39S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT238H15M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("uyxlykwphvxzcw", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("voaiknaqlnuw", model.testData().uri()); - Assertions.assertEquals(14.530784309792832D, model.testDataSize()); - Assertions.assertEquals("hxknlccrmmkyupi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("lkexaonwivkcqh", model.validationData().uri()); - Assertions.assertEquals(89.69731810693186D, model.validationDataSize()); - Assertions.assertEquals("jfkakfqfrke", model.weightColumnName()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java deleted file mode 100644 index c87e4250da7bc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"RandomForest\",\"TCNForecaster\",\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"Prophet\"],\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT217H25M43S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datadyedmzrgjfo\",\"stackMetaLearnerTrainPercentage\":17.660910285057906,\"stackMetaLearnerType\":\"LightGBMRegressor\"}}") - .toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT217H25M43S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(17.660910285057906D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingTrainingSettings model = - new ForecastingTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT217H25M43S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datadyedmzrgjfo") - .withStackMetaLearnerTrainPercentage(17.660910285057906D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms( - Arrays - .asList( - ForecastingModels.RANDOM_FOREST, - ForecastingModels.TCNFORECASTER, - ForecastingModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(ForecastingModels.RANDOM_FOREST, ForecastingModels.PROPHET)); - model = BinaryData.fromObject(model).toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT217H25M43S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(17.660910285057906D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java deleted file mode 100644 index f09ae260cee0a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointDetail model = BinaryData.fromString("{\"port\":1808760283}").toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1808760283, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointDetail model = new FqdnEndpointDetail().withPort(1808760283); - model = BinaryData.fromObject(model).toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1808760283, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java deleted file mode 100644 index 5a44acf3e5782..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoint model = - BinaryData - .fromString( - "{\"domainName\":\"ievseotgqrllt\",\"endpointDetails\":[{\"port\":883294723},{\"port\":1914003848},{\"port\":779410918},{\"port\":1035303462}]}") - .toObject(FqdnEndpoint.class); - Assertions.assertEquals("ievseotgqrllt", model.domainName()); - Assertions.assertEquals(883294723, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoint model = - new FqdnEndpoint() - .withDomainName("ievseotgqrllt") - .withEndpointDetails( - Arrays - .asList( - new FqdnEndpointDetail().withPort(883294723), - new FqdnEndpointDetail().withPort(1914003848), - new FqdnEndpointDetail().withPort(779410918), - new FqdnEndpointDetail().withPort(1035303462))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoint.class); - Assertions.assertEquals("ievseotgqrllt", model.domainName()); - Assertions.assertEquals(883294723, model.endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java deleted file mode 100644 index d3543134f5a7c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointsProperties model = - BinaryData - .fromString( - "{\"category\":\"qxn\",\"endpoints\":[{\"domainName\":\"gxhuriplbp\",\"endpointDetails\":[]},{\"domainName\":\"nkbebxmuby\",\"endpointDetails\":[]},{\"domainName\":\"lrb\",\"endpointDetails\":[]}]}") - .toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("qxn", model.category()); - Assertions.assertEquals("gxhuriplbp", model.endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointsProperties model = - new FqdnEndpointsProperties() - .withCategory("qxn") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint().withDomainName("gxhuriplbp").withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("nkbebxmuby").withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("lrb").withEndpointDetails(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("qxn", model.category()); - Assertions.assertEquals("gxhuriplbp", model.endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java deleted file mode 100644 index c2bc2b182d72f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoints model = - BinaryData - .fromString( - "{\"properties\":{\"category\":\"qqkdltfzxmhhvhgu\",\"endpoints\":[{\"domainName\":\"kwobdagxtibq\",\"endpointDetails\":[]},{\"domainName\":\"xwak\",\"endpointDetails\":[]}]}}") - .toObject(FqdnEndpoints.class); - Assertions.assertEquals("qqkdltfzxmhhvhgu", model.properties().category()); - Assertions.assertEquals("kwobdagxtibq", model.properties().endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoints model = - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("qqkdltfzxmhhvhgu") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint() - .withDomainName("kwobdagxtibq") - .withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("xwak").withEndpointDetails(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoints.class); - Assertions.assertEquals("qqkdltfzxmhhvhgu", model.properties().category()); - Assertions.assertEquals("kwobdagxtibq", model.properties().endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java deleted file mode 100644 index 451f4b5b2a136..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; - -public final class GridSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GridSamplingAlgorithm model = - BinaryData.fromString("{\"samplingAlgorithmType\":\"Grid\"}").toObject(GridSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GridSamplingAlgorithm model = new GridSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(GridSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java deleted file mode 100644 index d070ba11cf157..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class IdAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdAssetReference model = - BinaryData - .fromString("{\"referenceType\":\"Id\",\"assetId\":\"itpkpztrgdg\"}") - .toObject(IdAssetReference.class); - Assertions.assertEquals("itpkpztrgdg", model.assetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdAssetReference model = new IdAssetReference().withAssetId("itpkpztrgdg"); - model = BinaryData.fromObject(model).toObject(IdAssetReference.class); - Assertions.assertEquals("itpkpztrgdg", model.assetId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java deleted file mode 100644 index e4457f12102bd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; - -public final class IdentityConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityConfiguration model = - BinaryData.fromString("{\"identityType\":\"IdentityConfiguration\"}").toObject(IdentityConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityConfiguration model = new IdentityConfiguration(); - model = BinaryData.fromObject(model).toObject(IdentityConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java deleted file mode 100644 index 9ebb9969d0c24..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; -import org.junit.jupiter.api.Assertions; - -public final class IdentityForCmkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityForCmk model = - BinaryData.fromString("{\"userAssignedIdentity\":\"hanufhfcbjysagi\"}").toObject(IdentityForCmk.class); - Assertions.assertEquals("hanufhfcbjysagi", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("hanufhfcbjysagi"); - model = BinaryData.fromObject(model).toObject(IdentityForCmk.class); - Assertions.assertEquals("hanufhfcbjysagi", model.userAssignedIdentity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java deleted file mode 100644 index 2dbbce706d3a4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java +++ /dev/null @@ -1,362 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationBase; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationBase model = - BinaryData - .fromString( - "{\"modelSettings\":{\"trainingCropSize\":632161025,\"validationCropSize\":1319895932,\"validationResizeSize\":1773341425,\"weightedLoss\":2065297037,\"advancedSettings\":\"a\",\"amsGradient\":true,\"augmentations\":\"nhsenwphpzfng\",\"beta1\":24.413616,\"beta2\":87.05071,\"checkpointFrequency\":304312927,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"wjjufwbe\",\"description\":\"k\"},\"checkpointRunId\":\"rhtssr\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1979060010,\"earlyStoppingPatience\":1774020224,\"enableOnnxNormalization\":true,\"evaluationFrequency\":853491099,\"gradientAccumulationStep\":1971606507,\"layersToFreeze\":323558985,\"learningRate\":42.430317,\"learningRateScheduler\":\"Step\",\"modelName\":\"zwxiytx\",\"momentum\":51.025497,\"nesterov\":true,\"numberOfEpochs\":1378257495,\"numberOfWorkers\":1753150962,\"optimizer\":\"Adam\",\"randomSeed\":1914645473,\"stepLRGamma\":97.39071,\"stepLRStepSize\":218117716,\"trainingBatchSize\":1079594168,\"validationBatchSize\":2132424945,\"warmupCosineLRCycles\":66.13355,\"warmupCosineLRWarmupEpochs\":568274703,\"weightDecay\":67.716774},\"searchSpace\":[{\"trainingCropSize\":\"egmmuteyxe\",\"validationCropSize\":\"uqi\",\"validationResizeSize\":\"jiitnspxlzdesygr\",\"weightedLoss\":\"waiufanra\",\"amsGradient\":\"fueqfrojs\",\"augmentations\":\"grhydk\",\"beta1\":\"ywezskiecafyg\",\"beta2\":\"xieqv\",\"distributed\":\"makli\",\"earlyStopping\":\"cahyhx\",\"earlyStoppingDelay\":\"ybxawoijpodtblx\",\"earlyStoppingPatience\":\"kwjdjodqhy\",\"enableOnnxNormalization\":\"ncn\",\"evaluationFrequency\":\"mehllizhceu\",\"gradientAccumulationStep\":\"qodkadppyibngql\",\"layersToFreeze\":\"ywrxw\",\"learningRate\":\"dtluvvadswzsn\",\"learningRateScheduler\":\"emlowuowhl\",\"modelName\":\"nwyrmouv\",\"momentum\":\"gmokzkltrfowt\",\"nesterov\":\"rfmvlihcvjdrqcrj\",\"numberOfEpochs\":\"h\",\"numberOfWorkers\":\"ukvhd\",\"optimizer\":\"wyojbfqzdkfnjyi\",\"randomSeed\":\"afr\",\"stepLRGamma\":\"qxmbjroumzzn\",\"stepLRStepSize\":\"l\",\"trainingBatchSize\":\"rhuzgfxonjtpu\",\"validationBatchSize\":\"l\",\"warmupCosineLRCycles\":\"pvti\",\"warmupCosineLRWarmupEpochs\":\"zbpdbo\",\"weightDecay\":\"gryfqiuasig\"},{\"trainingCropSize\":\"wsocnequygdjbo\",\"validationCropSize\":\"rmtqjkqevadr\",\"validationResizeSize\":\"wiu\",\"weightedLoss\":\"vcmjzkxiidisczsk\",\"amsGradient\":\"woqiqazugamxzkrr\",\"augmentations\":\"iisb\",\"beta1\":\"nppcce\",\"beta2\":\"ztdsbeza\",\"distributed\":\"f\",\"earlyStopping\":\"zxuizhyhnepkpe\",\"earlyStoppingDelay\":\"arxqiubx\",\"earlyStoppingPatience\":\"kecpxdazvdh\",\"enableOnnxNormalization\":\"mmkoszudb\",\"evaluationFrequency\":\"s\",\"gradientAccumulationStep\":\"rpcaqkiofkbtf\",\"layersToFreeze\":\"kl\",\"learningRate\":\"l\",\"learningRateScheduler\":\"vcb\",\"modelName\":\"ezyquw\",\"momentum\":\"qxutrpbrruyuua\",\"nesterov\":\"lmbjwcolbmxlbnw\",\"numberOfEpochs\":\"cpahprzrvxhm\",\"numberOfWorkers\":\"hocn\",\"optimizer\":\"cmj\",\"randomSeed\":\"gxnoqrxtdis\",\"stepLRGamma\":\"evhdlmydid\",\"stepLRStepSize\":\"epfwwt\",\"trainingBatchSize\":\"doesxxhmwcdb\",\"validationBatchSize\":\"yo\",\"warmupCosineLRCycles\":\"xkxhnegknjzrbhtm\",\"warmupCosineLRWarmupEpochs\":\"lvukaobrlb\",\"weightDecay\":\"snbagnchjhg\"},{\"trainingCropSize\":\"uowakyw\",\"validationCropSize\":\"hjym\",\"validationResizeSize\":\"gqtagd\",\"weightedLoss\":\"lss\",\"amsGradient\":\"jomevtfycnlb\",\"augmentations\":\"jcodkkgjiiytssi\",\"beta1\":\"z\",\"beta2\":\"ufqbvntnr\",\"distributed\":\"qsorh\",\"earlyStopping\":\"kxgnlykmxcpwzvmd\",\"earlyStoppingDelay\":\"sqdtiwlwxlbon\",\"earlyStoppingPatience\":\"bazqicqchygtvxby\",\"enableOnnxNormalization\":\"nepubdpkxyqvgx\",\"evaluationFrequency\":\"od\",\"gradientAccumulationStep\":\"vohkxdxuws\",\"layersToFreeze\":\"fmcwnosb\",\"learningRate\":\"ehgcvkbcknjo\",\"learningRateScheduler\":\"jy\",\"modelName\":\"pvelszerqze\",\"momentum\":\"o\",\"nesterov\":\"intxwa\",\"numberOfEpochs\":\"glzoblqwa\",\"numberOfWorkers\":\"r\",\"optimizer\":\"lhm\",\"randomSeed\":\"qb\",\"stepLRGamma\":\"vafjrqpjiyrqj\",\"stepLRStepSize\":\"gaxwmzwdfkbnrzo\",\"trainingBatchSize\":\"dltb\",\"validationBatchSize\":\"tqjfgxxsaet\",\"warmupCosineLRCycles\":\"dgvpyig\",\"warmupCosineLRWarmupEpochs\":\"qqil\",\"weightDecay\":\"cduwjoedx\"}],\"limitSettings\":{\"maxConcurrentTrials\":1780634429,\"maxTrials\":899036768,\"timeout\":\"PT30H59M40S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1408151149,\"evaluationInterval\":505810781},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"jqqacdmkx\",\"description\":\"dcvjwc\"},\"validationDataSize\":47.866367600253014}") - .toObject(ImageClassificationBase.class); - Assertions.assertEquals(1780634429, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(899036768, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT30H59M40S"), model.limitSettings().timeout()); - Assertions.assertEquals(1408151149, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(505810781, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("dcvjwc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("jqqacdmkx", model.validationData().uri()); - Assertions.assertEquals(47.866367600253014D, model.validationDataSize()); - Assertions.assertEquals("a", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("nhsenwphpzfng", model.modelSettings().augmentations()); - Assertions.assertEquals(24.413616F, model.modelSettings().beta1()); - Assertions.assertEquals(87.05071F, model.modelSettings().beta2()); - Assertions.assertEquals(304312927, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("k", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("wjjufwbe", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("rhtssr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1979060010, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1774020224, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(853491099, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1971606507, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(323558985, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(42.430317F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("zwxiytx", model.modelSettings().modelName()); - Assertions.assertEquals(51.025497F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1378257495, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1753150962, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1914645473, model.modelSettings().randomSeed()); - Assertions.assertEquals(97.39071F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(218117716, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1079594168, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(2132424945, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(66.13355F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(568274703, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(67.716774F, model.modelSettings().weightDecay()); - Assertions.assertEquals(632161025, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(1319895932, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1773341425, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2065297037, model.modelSettings().weightedLoss()); - Assertions.assertEquals("fueqfrojs", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("grhydk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ywezskiecafyg", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("xieqv", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("makli", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cahyhx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("ybxawoijpodtblx", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("kwjdjodqhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("ncn", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mehllizhceu", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("qodkadppyibngql", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("ywrxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("dtluvvadswzsn", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("emlowuowhl", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("nwyrmouv", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("gmokzkltrfowt", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("rfmvlihcvjdrqcrj", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("h", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ukvhd", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("wyojbfqzdkfnjyi", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("afr", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("qxmbjroumzzn", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("l", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("rhuzgfxonjtpu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("l", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("pvti", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("zbpdbo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("gryfqiuasig", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("egmmuteyxe", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("uqi", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("jiitnspxlzdesygr", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("waiufanra", model.searchSpace().get(0).weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationBase model = - new ImageClassificationBase() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1780634429) - .withMaxTrials(899036768) - .withTimeout(Duration.parse("PT30H59M40S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1408151149) - .withEvaluationInterval(505810781)) - .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) - .withValidationData( - new MLTableJobInput() - .withDescription("dcvjwc") - .withMode(InputDeliveryMode.DIRECT) - .withUri("jqqacdmkx")) - .withValidationDataSize(47.866367600253014D) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("a") - .withAmsGradient(true) - .withAugmentations("nhsenwphpzfng") - .withBeta1(24.413616F) - .withBeta2(87.05071F) - .withCheckpointFrequency(304312927) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("k") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("wjjufwbe")) - .withCheckpointRunId("rhtssr") - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1979060010) - .withEarlyStoppingPatience(1774020224) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(853491099) - .withGradientAccumulationStep(1971606507) - .withLayersToFreeze(323558985) - .withLearningRate(42.430317F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("zwxiytx") - .withMomentum(51.025497F) - .withNesterov(true) - .withNumberOfEpochs(1378257495) - .withNumberOfWorkers(1753150962) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1914645473) - .withStepLRGamma(97.39071F) - .withStepLRStepSize(218117716) - .withTrainingBatchSize(1079594168) - .withValidationBatchSize(2132424945) - .withWarmupCosineLRCycles(66.13355F) - .withWarmupCosineLRWarmupEpochs(568274703) - .withWeightDecay(67.716774F) - .withTrainingCropSize(632161025) - .withValidationCropSize(1319895932) - .withValidationResizeSize(1773341425) - .withWeightedLoss(2065297037)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("fueqfrojs") - .withAugmentations("grhydk") - .withBeta1("ywezskiecafyg") - .withBeta2("xieqv") - .withDistributed("makli") - .withEarlyStopping("cahyhx") - .withEarlyStoppingDelay("ybxawoijpodtblx") - .withEarlyStoppingPatience("kwjdjodqhy") - .withEnableOnnxNormalization("ncn") - .withEvaluationFrequency("mehllizhceu") - .withGradientAccumulationStep("qodkadppyibngql") - .withLayersToFreeze("ywrxw") - .withLearningRate("dtluvvadswzsn") - .withLearningRateScheduler("emlowuowhl") - .withModelName("nwyrmouv") - .withMomentum("gmokzkltrfowt") - .withNesterov("rfmvlihcvjdrqcrj") - .withNumberOfEpochs("h") - .withNumberOfWorkers("ukvhd") - .withOptimizer("wyojbfqzdkfnjyi") - .withRandomSeed("afr") - .withStepLRGamma("qxmbjroumzzn") - .withStepLRStepSize("l") - .withTrainingBatchSize("rhuzgfxonjtpu") - .withValidationBatchSize("l") - .withWarmupCosineLRCycles("pvti") - .withWarmupCosineLRWarmupEpochs("zbpdbo") - .withWeightDecay("gryfqiuasig") - .withTrainingCropSize("egmmuteyxe") - .withValidationCropSize("uqi") - .withValidationResizeSize("jiitnspxlzdesygr") - .withWeightedLoss("waiufanra"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("woqiqazugamxzkrr") - .withAugmentations("iisb") - .withBeta1("nppcce") - .withBeta2("ztdsbeza") - .withDistributed("f") - .withEarlyStopping("zxuizhyhnepkpe") - .withEarlyStoppingDelay("arxqiubx") - .withEarlyStoppingPatience("kecpxdazvdh") - .withEnableOnnxNormalization("mmkoszudb") - .withEvaluationFrequency("s") - .withGradientAccumulationStep("rpcaqkiofkbtf") - .withLayersToFreeze("kl") - .withLearningRate("l") - .withLearningRateScheduler("vcb") - .withModelName("ezyquw") - .withMomentum("qxutrpbrruyuua") - .withNesterov("lmbjwcolbmxlbnw") - .withNumberOfEpochs("cpahprzrvxhm") - .withNumberOfWorkers("hocn") - .withOptimizer("cmj") - .withRandomSeed("gxnoqrxtdis") - .withStepLRGamma("evhdlmydid") - .withStepLRStepSize("epfwwt") - .withTrainingBatchSize("doesxxhmwcdb") - .withValidationBatchSize("yo") - .withWarmupCosineLRCycles("xkxhnegknjzrbhtm") - .withWarmupCosineLRWarmupEpochs("lvukaobrlb") - .withWeightDecay("snbagnchjhg") - .withTrainingCropSize("wsocnequygdjbo") - .withValidationCropSize("rmtqjkqevadr") - .withValidationResizeSize("wiu") - .withWeightedLoss("vcmjzkxiidisczsk"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("jomevtfycnlb") - .withAugmentations("jcodkkgjiiytssi") - .withBeta1("z") - .withBeta2("ufqbvntnr") - .withDistributed("qsorh") - .withEarlyStopping("kxgnlykmxcpwzvmd") - .withEarlyStoppingDelay("sqdtiwlwxlbon") - .withEarlyStoppingPatience("bazqicqchygtvxby") - .withEnableOnnxNormalization("nepubdpkxyqvgx") - .withEvaluationFrequency("od") - .withGradientAccumulationStep("vohkxdxuws") - .withLayersToFreeze("fmcwnosb") - .withLearningRate("ehgcvkbcknjo") - .withLearningRateScheduler("jy") - .withModelName("pvelszerqze") - .withMomentum("o") - .withNesterov("intxwa") - .withNumberOfEpochs("glzoblqwa") - .withNumberOfWorkers("r") - .withOptimizer("lhm") - .withRandomSeed("qb") - .withStepLRGamma("vafjrqpjiyrqj") - .withStepLRStepSize("gaxwmzwdfkbnrzo") - .withTrainingBatchSize("dltb") - .withValidationBatchSize("tqjfgxxsaet") - .withWarmupCosineLRCycles("dgvpyig") - .withWarmupCosineLRWarmupEpochs("qqil") - .withWeightDecay("cduwjoedx") - .withTrainingCropSize("uowakyw") - .withValidationCropSize("hjym") - .withValidationResizeSize("gqtagd") - .withWeightedLoss("lss"))); - model = BinaryData.fromObject(model).toObject(ImageClassificationBase.class); - Assertions.assertEquals(1780634429, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(899036768, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT30H59M40S"), model.limitSettings().timeout()); - Assertions.assertEquals(1408151149, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(505810781, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("dcvjwc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("jqqacdmkx", model.validationData().uri()); - Assertions.assertEquals(47.866367600253014D, model.validationDataSize()); - Assertions.assertEquals("a", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("nhsenwphpzfng", model.modelSettings().augmentations()); - Assertions.assertEquals(24.413616F, model.modelSettings().beta1()); - Assertions.assertEquals(87.05071F, model.modelSettings().beta2()); - Assertions.assertEquals(304312927, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("k", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("wjjufwbe", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("rhtssr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1979060010, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1774020224, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(853491099, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1971606507, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(323558985, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(42.430317F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("zwxiytx", model.modelSettings().modelName()); - Assertions.assertEquals(51.025497F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1378257495, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1753150962, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1914645473, model.modelSettings().randomSeed()); - Assertions.assertEquals(97.39071F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(218117716, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1079594168, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(2132424945, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(66.13355F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(568274703, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(67.716774F, model.modelSettings().weightDecay()); - Assertions.assertEquals(632161025, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(1319895932, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1773341425, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2065297037, model.modelSettings().weightedLoss()); - Assertions.assertEquals("fueqfrojs", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("grhydk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ywezskiecafyg", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("xieqv", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("makli", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cahyhx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("ybxawoijpodtblx", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("kwjdjodqhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("ncn", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mehllizhceu", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("qodkadppyibngql", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("ywrxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("dtluvvadswzsn", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("emlowuowhl", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("nwyrmouv", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("gmokzkltrfowt", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("rfmvlihcvjdrqcrj", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("h", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ukvhd", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("wyojbfqzdkfnjyi", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("afr", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("qxmbjroumzzn", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("l", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("rhuzgfxonjtpu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("l", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("pvti", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("zbpdbo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("gryfqiuasig", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("egmmuteyxe", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("uqi", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("jiitnspxlzdesygr", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("waiufanra", model.searchSpace().get(0).weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java deleted file mode 100644 index 8e2df216288ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java +++ /dev/null @@ -1,414 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationMultilabel model = - BinaryData - .fromString( - "{\"taskType\":\"ImageClassificationMultilabel\",\"primaryMetric\":\"AUCWeighted\",\"modelSettings\":{\"trainingCropSize\":417240457,\"validationCropSize\":789963505,\"validationResizeSize\":69598333,\"weightedLoss\":1308483372,\"advancedSettings\":\"bjkdtfohf\",\"amsGradient\":true,\"augmentations\":\"vkiwrsiwdyjqu\",\"beta1\":22.829306,\"beta2\":15.07703,\"checkpointFrequency\":405607966,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalMount\",\"uri\":\"kcsueho\",\"description\":\"dac\"},\"checkpointRunId\":\"bgydlqidywm\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":750629994,\"earlyStoppingPatience\":1002138354,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1214590834,\"gradientAccumulationStep\":1690234008,\"layersToFreeze\":541884766,\"learningRate\":83.81946,\"learningRateScheduler\":\"None\",\"modelName\":\"fnqt\",\"momentum\":10.774154,\"nesterov\":false,\"numberOfEpochs\":1583628489,\"numberOfWorkers\":10545664,\"optimizer\":\"Adamw\",\"randomSeed\":645986055,\"stepLRGamma\":13.888711,\"stepLRStepSize\":1004373323,\"trainingBatchSize\":1424628175,\"validationBatchSize\":1893405653,\"warmupCosineLRCycles\":73.06933,\"warmupCosineLRWarmupEpochs\":669991542,\"weightDecay\":8.02623},\"searchSpace\":[{\"trainingCropSize\":\"x\",\"validationCropSize\":\"vmywhsbrcarycsjj\",\"validationResizeSize\":\"voaqajuvehzptdmk\",\"weightedLoss\":\"bhmpfulubefgybp\",\"amsGradient\":\"bfununmpzkrv\",\"augmentations\":\"ifkdschlzvf\",\"beta1\":\"tnkjjwgcwnphb\",\"beta2\":\"fyrtogmhmjp\",\"distributed\":\"cdf\",\"earlyStopping\":\"qwtygevgwmseharx\",\"earlyStoppingDelay\":\"vqnrxtmbpj\",\"earlyStoppingPatience\":\"nvwjhrsidqpxl\",\"enableOnnxNormalization\":\"pakftngatwm\",\"evaluationFrequency\":\"yutrymd\",\"gradientAccumulationStep\":\"fj\",\"layersToFreeze\":\"y\",\"learningRate\":\"jqdvdwkqpldrlefg\",\"learningRateScheduler\":\"avuagnteta\",\"modelName\":\"tnpdctuhspfefy\",\"momentum\":\"duyeuyl\",\"nesterov\":\"hmtybkcgsuthhll\",\"numberOfEpochs\":\"wynefx\",\"numberOfWorkers\":\"lf\",\"optimizer\":\"atxtjrrlkmdskjhh\",\"randomSeed\":\"lajfoxcxscvslxlh\",\"stepLRGamma\":\"vkrmukmyjmkx\",\"stepLRStepSize\":\"tcsloj\",\"trainingBatchSize\":\"qid\",\"validationBatchSize\":\"toqxjh\",\"warmupCosineLRCycles\":\"csqhtkbtnqlrng\",\"warmupCosineLRWarmupEpochs\":\"mbiipsnawwlqk\",\"weightDecay\":\"xhhllxricct\"},{\"trainingCropSize\":\"muqqoajxei\",\"validationCropSize\":\"lesrwva\",\"validationResizeSize\":\"hdctrceqn\",\"weightedLoss\":\"rupobehd\",\"amsGradient\":\"jzacvumepjpbibn\",\"augmentations\":\"phepifexleqirc\",\"beta1\":\"cly\",\"beta2\":\"gxvrpjl\",\"distributed\":\"zuodacpun\",\"earlyStopping\":\"tepdjxqes\",\"earlyStoppingDelay\":\"ynu\",\"earlyStoppingPatience\":\"lpckaewsedves\",\"enableOnnxNormalization\":\"xegqphr\",\"evaluationFrequency\":\"nzhctmjtsgh\",\"gradientAccumulationStep\":\"c\",\"layersToFreeze\":\"pzarpzeqacdld\",\"learningRate\":\"mpypefcpczshnuq\",\"learningRateScheduler\":\"aizu\",\"modelName\":\"kh\",\"momentum\":\"tu\",\"nesterov\":\"xhmt\",\"numberOfEpochs\":\"vegwqiukvz\",\"numberOfWorkers\":\"dwttha\",\"optimizer\":\"gkskjivbss\",\"randomSeed\":\"jqf\",\"stepLRGamma\":\"peexpgeumilhwuit\",\"stepLRStepSize\":\"exyionofninbd\",\"trainingBatchSize\":\"s\",\"validationBatchSize\":\"wqqrsmpcbbprtuga\",\"warmupCosineLRCycles\":\"zbcyksiv\",\"warmupCosineLRWarmupEpochs\":\"ogd\",\"weightDecay\":\"bfcmkrfts\"},{\"trainingCropSize\":\"wjjxsgm\",\"validationCropSize\":\"wvif\",\"validationResizeSize\":\"kecifhocjxwklo\",\"weightedLoss\":\"rvtxvcmufunlc\",\"amsGradient\":\"xvi\",\"augmentations\":\"eyngjg\",\"beta1\":\"quv\",\"beta2\":\"gglpmcrdcuelj\",\"distributed\":\"ahxm\",\"earlyStopping\":\"ryarvsxzqb\",\"earlyStoppingDelay\":\"cjkay\",\"earlyStoppingPatience\":\"thzodubtlmjtgbl\",\"enableOnnxNormalization\":\"skkfmk\",\"evaluationFrequency\":\"djxyxgbkkqvjcteo\",\"gradientAccumulationStep\":\"l\",\"layersToFreeze\":\"lskkzpxvj\",\"learningRate\":\"dpvocojhpcn\",\"learningRateScheduler\":\"xzfsnggytexvzilm\",\"modelName\":\"vzkwwwncknr\",\"momentum\":\"ajlskzptj\",\"nesterov\":\"lwe\",\"numberOfEpochs\":\"yrth\",\"numberOfWorkers\":\"lehmcgcjeinueho\",\"optimizer\":\"mvfejvqnttmbqd\",\"randomSeed\":\"zfivfokpysthhzag\",\"stepLRGamma\":\"wyy\",\"stepLRStepSize\":\"hgenuzejgvkveb\",\"trainingBatchSize\":\"szllrzlsmmdqgmi\",\"validationBatchSize\":\"pimcqrhn\",\"warmupCosineLRCycles\":\"minkl\",\"warmupCosineLRWarmupEpochs\":\"xsvtzarhzvqnsqk\",\"weightDecay\":\"mbjwzzoslpkyb\"},{\"trainingCropSize\":\"lwkzpgajsqjcem\",\"validationCropSize\":\"mfuvqarwzxuqr\",\"validationResizeSize\":\"lui\",\"weightedLoss\":\"bwxsfgtdm\",\"amsGradient\":\"xekr\",\"augmentations\":\"k\",\"beta1\":\"budbt\",\"beta2\":\"okbavlyttaak\",\"distributed\":\"frkebsmhpd\",\"earlyStopping\":\"dig\",\"earlyStoppingDelay\":\"olekscbctnanqim\",\"earlyStoppingPatience\":\"zxpdcldpkawnsnl\",\"enableOnnxNormalization\":\"mouxwksqmudmfco\",\"evaluationFrequency\":\"icziuswswjrkb\",\"gradientAccumulationStep\":\"jhbtqq\",\"layersToFreeze\":\"fs\",\"learningRate\":\"rfwb\",\"learningRateScheduler\":\"qvogfuyz\",\"modelName\":\"bhli\",\"momentum\":\"yqe\",\"nesterov\":\"ood\",\"numberOfEpochs\":\"kcdrdaasaxxobsm\",\"numberOfWorkers\":\"wiyjvzuko\",\"optimizer\":\"nawnvz\",\"randomSeed\":\"n\",\"stepLRGamma\":\"ywsxvjabjqqaxu\",\"stepLRStepSize\":\"y\",\"trainingBatchSize\":\"nudn\",\"validationBatchSize\":\"abhjx\",\"warmupCosineLRCycles\":\"qweuip\",\"warmupCosineLRWarmupEpochs\":\"vk\",\"weightDecay\":\"itnsqxtltc\"}],\"limitSettings\":{\"maxConcurrentTrials\":2077569332,\"maxTrials\":49498731,\"timeout\":\"PT39H45M28S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1996640929,\"evaluationInterval\":1459369662},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"d\",\"description\":\"c\"},\"validationDataSize\":60.747284942704425,\"logVerbosity\":\"Debug\",\"targetColumnName\":\"rjajqmatxjtie\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"qgxxgfbb\",\"description\":\"lpqagyn\"}}") - .toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("rjajqmatxjtie", model.targetColumnName()); - Assertions.assertEquals("lpqagyn", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("qgxxgfbb", model.trainingData().uri()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals("bjkdtfohf", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("vkiwrsiwdyjqu", model.modelSettings().augmentations()); - Assertions.assertEquals(22.829306F, model.modelSettings().beta1()); - Assertions.assertEquals(15.07703F, model.modelSettings().beta2()); - Assertions.assertEquals(405607966, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("dac", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("kcsueho", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("bgydlqidywm", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(750629994, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1002138354, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1214590834, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1690234008, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(541884766, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(83.81946F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("fnqt", model.modelSettings().modelName()); - Assertions.assertEquals(10.774154F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1583628489, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(10545664, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(645986055, model.modelSettings().randomSeed()); - Assertions.assertEquals(13.888711F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1004373323, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1424628175, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1893405653, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(73.06933F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(669991542, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(8.02623F, model.modelSettings().weightDecay()); - Assertions.assertEquals(417240457, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(789963505, model.modelSettings().validationCropSize()); - Assertions.assertEquals(69598333, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1308483372, model.modelSettings().weightedLoss()); - Assertions.assertEquals("bfununmpzkrv", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("ifkdschlzvf", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("tnkjjwgcwnphb", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("fyrtogmhmjp", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("cdf", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("qwtygevgwmseharx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vqnrxtmbpj", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("nvwjhrsidqpxl", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("pakftngatwm", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("yutrymd", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("y", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("avuagnteta", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("tnpdctuhspfefy", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("duyeuyl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hmtybkcgsuthhll", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("wynefx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("lf", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("atxtjrrlkmdskjhh", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lajfoxcxscvslxlh", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("vkrmukmyjmkx", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("tcsloj", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("qid", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("toqxjh", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("csqhtkbtnqlrng", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("mbiipsnawwlqk", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("xhhllxricct", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("x", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("vmywhsbrcarycsjj", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("voaqajuvehzptdmk", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("bhmpfulubefgybp", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(2077569332, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(49498731, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT39H45M28S"), model.limitSettings().timeout()); - Assertions.assertEquals(1996640929, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1459369662, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("c", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("d", model.validationData().uri()); - Assertions.assertEquals(60.747284942704425D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationMultilabel model = - new ImageClassificationMultilabel() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("rjajqmatxjtie") - .withTrainingData( - new MLTableJobInput() - .withDescription("lpqagyn") - .withMode(InputDeliveryMode.DIRECT) - .withUri("qgxxgfbb")) - .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("bjkdtfohf") - .withAmsGradient(true) - .withAugmentations("vkiwrsiwdyjqu") - .withBeta1(22.829306F) - .withBeta2(15.07703F) - .withCheckpointFrequency(405607966) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("dac") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("kcsueho")) - .withCheckpointRunId("bgydlqidywm") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(750629994) - .withEarlyStoppingPatience(1002138354) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1214590834) - .withGradientAccumulationStep(1690234008) - .withLayersToFreeze(541884766) - .withLearningRate(83.81946F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("fnqt") - .withMomentum(10.774154F) - .withNesterov(false) - .withNumberOfEpochs(1583628489) - .withNumberOfWorkers(10545664) - .withOptimizer(StochasticOptimizer.ADAMW) - .withRandomSeed(645986055) - .withStepLRGamma(13.888711F) - .withStepLRStepSize(1004373323) - .withTrainingBatchSize(1424628175) - .withValidationBatchSize(1893405653) - .withWarmupCosineLRCycles(73.06933F) - .withWarmupCosineLRWarmupEpochs(669991542) - .withWeightDecay(8.02623F) - .withTrainingCropSize(417240457) - .withValidationCropSize(789963505) - .withValidationResizeSize(69598333) - .withWeightedLoss(1308483372)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("bfununmpzkrv") - .withAugmentations("ifkdschlzvf") - .withBeta1("tnkjjwgcwnphb") - .withBeta2("fyrtogmhmjp") - .withDistributed("cdf") - .withEarlyStopping("qwtygevgwmseharx") - .withEarlyStoppingDelay("vqnrxtmbpj") - .withEarlyStoppingPatience("nvwjhrsidqpxl") - .withEnableOnnxNormalization("pakftngatwm") - .withEvaluationFrequency("yutrymd") - .withGradientAccumulationStep("fj") - .withLayersToFreeze("y") - .withLearningRate("jqdvdwkqpldrlefg") - .withLearningRateScheduler("avuagnteta") - .withModelName("tnpdctuhspfefy") - .withMomentum("duyeuyl") - .withNesterov("hmtybkcgsuthhll") - .withNumberOfEpochs("wynefx") - .withNumberOfWorkers("lf") - .withOptimizer("atxtjrrlkmdskjhh") - .withRandomSeed("lajfoxcxscvslxlh") - .withStepLRGamma("vkrmukmyjmkx") - .withStepLRStepSize("tcsloj") - .withTrainingBatchSize("qid") - .withValidationBatchSize("toqxjh") - .withWarmupCosineLRCycles("csqhtkbtnqlrng") - .withWarmupCosineLRWarmupEpochs("mbiipsnawwlqk") - .withWeightDecay("xhhllxricct") - .withTrainingCropSize("x") - .withValidationCropSize("vmywhsbrcarycsjj") - .withValidationResizeSize("voaqajuvehzptdmk") - .withWeightedLoss("bhmpfulubefgybp"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("jzacvumepjpbibn") - .withAugmentations("phepifexleqirc") - .withBeta1("cly") - .withBeta2("gxvrpjl") - .withDistributed("zuodacpun") - .withEarlyStopping("tepdjxqes") - .withEarlyStoppingDelay("ynu") - .withEarlyStoppingPatience("lpckaewsedves") - .withEnableOnnxNormalization("xegqphr") - .withEvaluationFrequency("nzhctmjtsgh") - .withGradientAccumulationStep("c") - .withLayersToFreeze("pzarpzeqacdld") - .withLearningRate("mpypefcpczshnuq") - .withLearningRateScheduler("aizu") - .withModelName("kh") - .withMomentum("tu") - .withNesterov("xhmt") - .withNumberOfEpochs("vegwqiukvz") - .withNumberOfWorkers("dwttha") - .withOptimizer("gkskjivbss") - .withRandomSeed("jqf") - .withStepLRGamma("peexpgeumilhwuit") - .withStepLRStepSize("exyionofninbd") - .withTrainingBatchSize("s") - .withValidationBatchSize("wqqrsmpcbbprtuga") - .withWarmupCosineLRCycles("zbcyksiv") - .withWarmupCosineLRWarmupEpochs("ogd") - .withWeightDecay("bfcmkrfts") - .withTrainingCropSize("muqqoajxei") - .withValidationCropSize("lesrwva") - .withValidationResizeSize("hdctrceqn") - .withWeightedLoss("rupobehd"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("xvi") - .withAugmentations("eyngjg") - .withBeta1("quv") - .withBeta2("gglpmcrdcuelj") - .withDistributed("ahxm") - .withEarlyStopping("ryarvsxzqb") - .withEarlyStoppingDelay("cjkay") - .withEarlyStoppingPatience("thzodubtlmjtgbl") - .withEnableOnnxNormalization("skkfmk") - .withEvaluationFrequency("djxyxgbkkqvjcteo") - .withGradientAccumulationStep("l") - .withLayersToFreeze("lskkzpxvj") - .withLearningRate("dpvocojhpcn") - .withLearningRateScheduler("xzfsnggytexvzilm") - .withModelName("vzkwwwncknr") - .withMomentum("ajlskzptj") - .withNesterov("lwe") - .withNumberOfEpochs("yrth") - .withNumberOfWorkers("lehmcgcjeinueho") - .withOptimizer("mvfejvqnttmbqd") - .withRandomSeed("zfivfokpysthhzag") - .withStepLRGamma("wyy") - .withStepLRStepSize("hgenuzejgvkveb") - .withTrainingBatchSize("szllrzlsmmdqgmi") - .withValidationBatchSize("pimcqrhn") - .withWarmupCosineLRCycles("minkl") - .withWarmupCosineLRWarmupEpochs("xsvtzarhzvqnsqk") - .withWeightDecay("mbjwzzoslpkyb") - .withTrainingCropSize("wjjxsgm") - .withValidationCropSize("wvif") - .withValidationResizeSize("kecifhocjxwklo") - .withWeightedLoss("rvtxvcmufunlc"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("xekr") - .withAugmentations("k") - .withBeta1("budbt") - .withBeta2("okbavlyttaak") - .withDistributed("frkebsmhpd") - .withEarlyStopping("dig") - .withEarlyStoppingDelay("olekscbctnanqim") - .withEarlyStoppingPatience("zxpdcldpkawnsnl") - .withEnableOnnxNormalization("mouxwksqmudmfco") - .withEvaluationFrequency("icziuswswjrkb") - .withGradientAccumulationStep("jhbtqq") - .withLayersToFreeze("fs") - .withLearningRate("rfwb") - .withLearningRateScheduler("qvogfuyz") - .withModelName("bhli") - .withMomentum("yqe") - .withNesterov("ood") - .withNumberOfEpochs("kcdrdaasaxxobsm") - .withNumberOfWorkers("wiyjvzuko") - .withOptimizer("nawnvz") - .withRandomSeed("n") - .withStepLRGamma("ywsxvjabjqqaxu") - .withStepLRStepSize("y") - .withTrainingBatchSize("nudn") - .withValidationBatchSize("abhjx") - .withWarmupCosineLRCycles("qweuip") - .withWarmupCosineLRWarmupEpochs("vk") - .withWeightDecay("itnsqxtltc") - .withTrainingCropSize("lwkzpgajsqjcem") - .withValidationCropSize("mfuvqarwzxuqr") - .withValidationResizeSize("lui") - .withWeightedLoss("bwxsfgtdm"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(2077569332) - .withMaxTrials(49498731) - .withTimeout(Duration.parse("PT39H45M28S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1996640929) - .withEvaluationInterval(1459369662)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput().withDescription("c").withMode(InputDeliveryMode.EVAL_MOUNT).withUri("d")) - .withValidationDataSize(60.747284942704425D); - model = BinaryData.fromObject(model).toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("rjajqmatxjtie", model.targetColumnName()); - Assertions.assertEquals("lpqagyn", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("qgxxgfbb", model.trainingData().uri()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals("bjkdtfohf", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("vkiwrsiwdyjqu", model.modelSettings().augmentations()); - Assertions.assertEquals(22.829306F, model.modelSettings().beta1()); - Assertions.assertEquals(15.07703F, model.modelSettings().beta2()); - Assertions.assertEquals(405607966, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("dac", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("kcsueho", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("bgydlqidywm", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(750629994, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1002138354, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1214590834, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1690234008, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(541884766, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(83.81946F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("fnqt", model.modelSettings().modelName()); - Assertions.assertEquals(10.774154F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1583628489, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(10545664, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(645986055, model.modelSettings().randomSeed()); - Assertions.assertEquals(13.888711F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1004373323, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1424628175, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1893405653, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(73.06933F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(669991542, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(8.02623F, model.modelSettings().weightDecay()); - Assertions.assertEquals(417240457, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(789963505, model.modelSettings().validationCropSize()); - Assertions.assertEquals(69598333, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1308483372, model.modelSettings().weightedLoss()); - Assertions.assertEquals("bfununmpzkrv", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("ifkdschlzvf", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("tnkjjwgcwnphb", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("fyrtogmhmjp", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("cdf", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("qwtygevgwmseharx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vqnrxtmbpj", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("nvwjhrsidqpxl", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("pakftngatwm", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("yutrymd", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("y", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("avuagnteta", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("tnpdctuhspfefy", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("duyeuyl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hmtybkcgsuthhll", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("wynefx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("lf", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("atxtjrrlkmdskjhh", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lajfoxcxscvslxlh", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("vkrmukmyjmkx", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("tcsloj", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("qid", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("toqxjh", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("csqhtkbtnqlrng", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("mbiipsnawwlqk", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("xhhllxricct", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("x", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("vmywhsbrcarycsjj", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("voaqajuvehzptdmk", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("bhmpfulubefgybp", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(2077569332, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(49498731, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT39H45M28S"), model.limitSettings().timeout()); - Assertions.assertEquals(1996640929, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1459369662, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("c", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("d", model.validationData().uri()); - Assertions.assertEquals(60.747284942704425D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java deleted file mode 100644 index 7fd05a78c2d6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java +++ /dev/null @@ -1,384 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassification model = - BinaryData - .fromString( - "{\"taskType\":\"ImageClassification\",\"primaryMetric\":\"NormMacroRecall\",\"modelSettings\":{\"trainingCropSize\":857070249,\"validationCropSize\":372879313,\"validationResizeSize\":2040757308,\"weightedLoss\":601079141,\"advancedSettings\":\"pqitwe\",\"amsGradient\":false,\"augmentations\":\"vskbuhzacaq\",\"beta1\":35.776882,\"beta2\":7.5552106,\"checkpointFrequency\":1409246256,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"pdsxzakuejkm\",\"description\":\"iztjof\"},\"checkpointRunId\":\"vovjufycsjmlbe\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1797904663,\"earlyStoppingPatience\":544161528,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1168175827,\"gradientAccumulationStep\":920753916,\"layersToFreeze\":979183363,\"learningRate\":75.56595,\"learningRateScheduler\":\"None\",\"modelName\":\"jfel\",\"momentum\":99.81994,\"nesterov\":true,\"numberOfEpochs\":902490226,\"numberOfWorkers\":1270842979,\"optimizer\":\"Adam\",\"randomSeed\":1405675230,\"stepLRGamma\":4.9547615,\"stepLRStepSize\":462800461,\"trainingBatchSize\":1308773307,\"validationBatchSize\":1918220645,\"warmupCosineLRCycles\":88.28787,\"warmupCosineLRWarmupEpochs\":1219612283,\"weightDecay\":35.093628},\"searchSpace\":[{\"trainingCropSize\":\"ccgzpraoxnyu\",\"validationCropSize\":\"a\",\"validationResizeSize\":\"gftipwc\",\"weightedLoss\":\"yubhiqdx\",\"amsGradient\":\"rnpnuhzafccnuh\",\"augmentations\":\"gbylbuig\",\"beta1\":\"vatvcrkd\",\"beta2\":\"nbqxvhcsyhzlwxae\",\"distributed\":\"vurex\",\"earlyStopping\":\"d\",\"earlyStoppingDelay\":\"dwead\",\"earlyStoppingPatience\":\"zmwntopagt\",\"enableOnnxNormalization\":\"v\",\"evaluationFrequency\":\"agoaqylkjztji\",\"gradientAccumulationStep\":\"zjcg\",\"layersToFreeze\":\"itpfinzcpdl\",\"learningRate\":\"rlgjm\",\"learningRateScheduler\":\"drvcqguef\",\"modelName\":\"ompheqdur\",\"momentum\":\"yujlfyoumpckyecl\",\"nesterov\":\"igptajbrzmqxucyc\",\"numberOfEpochs\":\"oclxiut\",\"numberOfWorkers\":\"cyzyzjdnrqjbt\",\"optimizer\":\"eaoqaqbzgyhf\",\"randomSeed\":\"v\",\"stepLRGamma\":\"tbwbqamteuli\",\"stepLRStepSize\":\"lpkcvmwfauxxep\",\"trainingBatchSize\":\"wbormcqmi\",\"validationBatchSize\":\"ijqpkzfbojxjmcs\",\"warmupCosineLRCycles\":\"qwixvcpwnk\",\"warmupCosineLRWarmupEpochs\":\"wzwofalickduo\",\"weightDecay\":\"tamtyv\"},{\"trainingCropSize\":\"nxrwzawnvs\",\"validationCropSize\":\"fhzag\",\"validationResizeSize\":\"vhycvdimwrzregzg\",\"weightedLoss\":\"futrwpweryekzkd\",\"amsGradient\":\"eotta\",\"augmentations\":\"yos\",\"beta1\":\"whnhjtfv\",\"beta2\":\"dpmiljpn\",\"distributed\":\"nudqllz\",\"earlyStopping\":\"uzpjlxeehux\",\"earlyStoppingDelay\":\"hzlraymezxlsk\",\"earlyStoppingPatience\":\"mxrfdsa\",\"enableOnnxNormalization\":\"ednwyyshtu\",\"evaluationFrequency\":\"mevuafpwzy\",\"gradientAccumulationStep\":\"rkgwltxeqip\",\"layersToFreeze\":\"zdyi\",\"learningRate\":\"fayorpravkjoges\",\"learningRateScheduler\":\"bnsmjkwynqxaek\",\"modelName\":\"ykvwjtqpkevmyltj\",\"momentum\":\"spxklu\",\"nesterov\":\"clf\",\"numberOfEpochs\":\"annnoytzposewx\",\"numberOfWorkers\":\"pxvkqma\",\"optimizer\":\"xvpif\",\"randomSeed\":\"aifyzyzeyuubeids\",\"stepLRGamma\":\"fytoi\",\"stepLRStepSize\":\"gygvfltgvdiho\",\"trainingBatchSize\":\"krxwet\",\"validationBatchSize\":\"drcyrucpcun\",\"warmupCosineLRCycles\":\"zdqumoe\",\"warmupCosineLRWarmupEpochs\":\"dnaienhqhskndnel\",\"weightDecay\":\"aadl\"},{\"trainingCropSize\":\"wf\",\"validationCropSize\":\"nniyopetxi\",\"validationResizeSize\":\"nrlyxnuc\",\"weightedLoss\":\"p\",\"amsGradient\":\"lkwq\",\"augmentations\":\"tv\",\"beta1\":\"sdtcjbctvivuzqym\",\"beta2\":\"owog\",\"distributed\":\"it\",\"earlyStopping\":\"hzvb\",\"earlyStoppingDelay\":\"cdb\",\"earlyStoppingPatience\":\"fzndscxmxeatkd\",\"enableOnnxNormalization\":\"wnrdjyibqbnaom\",\"evaluationFrequency\":\"rmkuh\",\"gradientAccumulationStep\":\"xljalfihc\",\"layersToFreeze\":\"obcancdexxqcw\",\"learningRate\":\"xf\",\"learningRateScheduler\":\"aknokzwjjzrl\",\"modelName\":\"xldzyyfytpqsix\",\"momentum\":\"m\",\"nesterov\":\"jivyqlkjuv\",\"numberOfEpochs\":\"bmslzoyov\",\"numberOfWorkers\":\"dbpqvybefgvm\",\"optimizer\":\"okcvtlubses\",\"randomSeed\":\"cua\",\"stepLRGamma\":\"rhunlp\",\"stepLRStepSize\":\"ykycndzfqi\",\"trainingBatchSize\":\"reuykbbmnwagl\",\"validationBatchSize\":\"xoe\",\"warmupCosineLRCycles\":\"nqlnfwmyymvqd\",\"warmupCosineLRWarmupEpochs\":\"bhfckdvezcrcssb\",\"weightDecay\":\"ddubbnqfblhkal\"}],\"limitSettings\":{\"maxConcurrentTrials\":1165708950,\"maxTrials\":893248980,\"timeout\":\"PT229H8M42S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":536414260,\"evaluationInterval\":693878843},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"gdmin\",\"description\":\"tteajohiygs\"},\"validationDataSize\":75.70753002197551,\"logVerbosity\":\"Debug\",\"targetColumnName\":\"czykmktpvw\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"sehch\",\"description\":\"ufmpqumqyjgy\"}}") - .toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("czykmktpvw", model.targetColumnName()); - Assertions.assertEquals("ufmpqumqyjgy", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("sehch", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals("pqitwe", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vskbuhzacaq", model.modelSettings().augmentations()); - Assertions.assertEquals(35.776882F, model.modelSettings().beta1()); - Assertions.assertEquals(7.5552106F, model.modelSettings().beta2()); - Assertions.assertEquals(1409246256, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("iztjof", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("pdsxzakuejkm", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("vovjufycsjmlbe", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1797904663, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(544161528, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1168175827, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(920753916, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(979183363, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(75.56595F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("jfel", model.modelSettings().modelName()); - Assertions.assertEquals(99.81994F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(902490226, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1270842979, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1405675230, model.modelSettings().randomSeed()); - Assertions.assertEquals(4.9547615F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(462800461, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1308773307, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1918220645, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(88.28787F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1219612283, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(35.093628F, model.modelSettings().weightDecay()); - Assertions.assertEquals(857070249, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(372879313, model.modelSettings().validationCropSize()); - Assertions.assertEquals(2040757308, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(601079141, model.modelSettings().weightedLoss()); - Assertions.assertEquals("rnpnuhzafccnuh", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("gbylbuig", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("vatvcrkd", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("nbqxvhcsyhzlwxae", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("vurex", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("d", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("dwead", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("zmwntopagt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("v", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("agoaqylkjztji", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("zjcg", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("itpfinzcpdl", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("rlgjm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("drvcqguef", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ompheqdur", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("yujlfyoumpckyecl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("igptajbrzmqxucyc", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("oclxiut", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("cyzyzjdnrqjbt", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("eaoqaqbzgyhf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("v", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("tbwbqamteuli", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("lpkcvmwfauxxep", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("wbormcqmi", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("ijqpkzfbojxjmcs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qwixvcpwnk", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("wzwofalickduo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("tamtyv", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("ccgzpraoxnyu", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("a", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("gftipwc", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yubhiqdx", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1165708950, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(893248980, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT229H8M42S"), model.limitSettings().timeout()); - Assertions.assertEquals(536414260, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(693878843, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("tteajohiygs", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gdmin", model.validationData().uri()); - Assertions.assertEquals(75.70753002197551D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassification model = - new ImageClassification() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("czykmktpvw") - .withTrainingData( - new MLTableJobInput() - .withDescription("ufmpqumqyjgy") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("sehch")) - .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("pqitwe") - .withAmsGradient(false) - .withAugmentations("vskbuhzacaq") - .withBeta1(35.776882F) - .withBeta2(7.5552106F) - .withCheckpointFrequency(1409246256) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("iztjof") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("pdsxzakuejkm")) - .withCheckpointRunId("vovjufycsjmlbe") - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1797904663) - .withEarlyStoppingPatience(544161528) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1168175827) - .withGradientAccumulationStep(920753916) - .withLayersToFreeze(979183363) - .withLearningRate(75.56595F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("jfel") - .withMomentum(99.81994F) - .withNesterov(true) - .withNumberOfEpochs(902490226) - .withNumberOfWorkers(1270842979) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1405675230) - .withStepLRGamma(4.9547615F) - .withStepLRStepSize(462800461) - .withTrainingBatchSize(1308773307) - .withValidationBatchSize(1918220645) - .withWarmupCosineLRCycles(88.28787F) - .withWarmupCosineLRWarmupEpochs(1219612283) - .withWeightDecay(35.093628F) - .withTrainingCropSize(857070249) - .withValidationCropSize(372879313) - .withValidationResizeSize(2040757308) - .withWeightedLoss(601079141)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("rnpnuhzafccnuh") - .withAugmentations("gbylbuig") - .withBeta1("vatvcrkd") - .withBeta2("nbqxvhcsyhzlwxae") - .withDistributed("vurex") - .withEarlyStopping("d") - .withEarlyStoppingDelay("dwead") - .withEarlyStoppingPatience("zmwntopagt") - .withEnableOnnxNormalization("v") - .withEvaluationFrequency("agoaqylkjztji") - .withGradientAccumulationStep("zjcg") - .withLayersToFreeze("itpfinzcpdl") - .withLearningRate("rlgjm") - .withLearningRateScheduler("drvcqguef") - .withModelName("ompheqdur") - .withMomentum("yujlfyoumpckyecl") - .withNesterov("igptajbrzmqxucyc") - .withNumberOfEpochs("oclxiut") - .withNumberOfWorkers("cyzyzjdnrqjbt") - .withOptimizer("eaoqaqbzgyhf") - .withRandomSeed("v") - .withStepLRGamma("tbwbqamteuli") - .withStepLRStepSize("lpkcvmwfauxxep") - .withTrainingBatchSize("wbormcqmi") - .withValidationBatchSize("ijqpkzfbojxjmcs") - .withWarmupCosineLRCycles("qwixvcpwnk") - .withWarmupCosineLRWarmupEpochs("wzwofalickduo") - .withWeightDecay("tamtyv") - .withTrainingCropSize("ccgzpraoxnyu") - .withValidationCropSize("a") - .withValidationResizeSize("gftipwc") - .withWeightedLoss("yubhiqdx"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("eotta") - .withAugmentations("yos") - .withBeta1("whnhjtfv") - .withBeta2("dpmiljpn") - .withDistributed("nudqllz") - .withEarlyStopping("uzpjlxeehux") - .withEarlyStoppingDelay("hzlraymezxlsk") - .withEarlyStoppingPatience("mxrfdsa") - .withEnableOnnxNormalization("ednwyyshtu") - .withEvaluationFrequency("mevuafpwzy") - .withGradientAccumulationStep("rkgwltxeqip") - .withLayersToFreeze("zdyi") - .withLearningRate("fayorpravkjoges") - .withLearningRateScheduler("bnsmjkwynqxaek") - .withModelName("ykvwjtqpkevmyltj") - .withMomentum("spxklu") - .withNesterov("clf") - .withNumberOfEpochs("annnoytzposewx") - .withNumberOfWorkers("pxvkqma") - .withOptimizer("xvpif") - .withRandomSeed("aifyzyzeyuubeids") - .withStepLRGamma("fytoi") - .withStepLRStepSize("gygvfltgvdiho") - .withTrainingBatchSize("krxwet") - .withValidationBatchSize("drcyrucpcun") - .withWarmupCosineLRCycles("zdqumoe") - .withWarmupCosineLRWarmupEpochs("dnaienhqhskndnel") - .withWeightDecay("aadl") - .withTrainingCropSize("nxrwzawnvs") - .withValidationCropSize("fhzag") - .withValidationResizeSize("vhycvdimwrzregzg") - .withWeightedLoss("futrwpweryekzkd"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("lkwq") - .withAugmentations("tv") - .withBeta1("sdtcjbctvivuzqym") - .withBeta2("owog") - .withDistributed("it") - .withEarlyStopping("hzvb") - .withEarlyStoppingDelay("cdb") - .withEarlyStoppingPatience("fzndscxmxeatkd") - .withEnableOnnxNormalization("wnrdjyibqbnaom") - .withEvaluationFrequency("rmkuh") - .withGradientAccumulationStep("xljalfihc") - .withLayersToFreeze("obcancdexxqcw") - .withLearningRate("xf") - .withLearningRateScheduler("aknokzwjjzrl") - .withModelName("xldzyyfytpqsix") - .withMomentum("m") - .withNesterov("jivyqlkjuv") - .withNumberOfEpochs("bmslzoyov") - .withNumberOfWorkers("dbpqvybefgvm") - .withOptimizer("okcvtlubses") - .withRandomSeed("cua") - .withStepLRGamma("rhunlp") - .withStepLRStepSize("ykycndzfqi") - .withTrainingBatchSize("reuykbbmnwagl") - .withValidationBatchSize("xoe") - .withWarmupCosineLRCycles("nqlnfwmyymvqd") - .withWarmupCosineLRWarmupEpochs("bhfckdvezcrcssb") - .withWeightDecay("ddubbnqfblhkal") - .withTrainingCropSize("wf") - .withValidationCropSize("nniyopetxi") - .withValidationResizeSize("nrlyxnuc") - .withWeightedLoss("p"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1165708950) - .withMaxTrials(893248980) - .withTimeout(Duration.parse("PT229H8M42S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(536414260) - .withEvaluationInterval(693878843)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput() - .withDescription("tteajohiygs") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("gdmin")) - .withValidationDataSize(75.70753002197551D); - model = BinaryData.fromObject(model).toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("czykmktpvw", model.targetColumnName()); - Assertions.assertEquals("ufmpqumqyjgy", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("sehch", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals("pqitwe", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vskbuhzacaq", model.modelSettings().augmentations()); - Assertions.assertEquals(35.776882F, model.modelSettings().beta1()); - Assertions.assertEquals(7.5552106F, model.modelSettings().beta2()); - Assertions.assertEquals(1409246256, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("iztjof", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("pdsxzakuejkm", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("vovjufycsjmlbe", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1797904663, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(544161528, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1168175827, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(920753916, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(979183363, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(75.56595F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("jfel", model.modelSettings().modelName()); - Assertions.assertEquals(99.81994F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(902490226, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1270842979, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1405675230, model.modelSettings().randomSeed()); - Assertions.assertEquals(4.9547615F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(462800461, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1308773307, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1918220645, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(88.28787F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1219612283, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(35.093628F, model.modelSettings().weightDecay()); - Assertions.assertEquals(857070249, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(372879313, model.modelSettings().validationCropSize()); - Assertions.assertEquals(2040757308, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(601079141, model.modelSettings().weightedLoss()); - Assertions.assertEquals("rnpnuhzafccnuh", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("gbylbuig", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("vatvcrkd", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("nbqxvhcsyhzlwxae", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("vurex", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("d", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("dwead", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("zmwntopagt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("v", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("agoaqylkjztji", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("zjcg", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("itpfinzcpdl", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("rlgjm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("drvcqguef", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ompheqdur", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("yujlfyoumpckyecl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("igptajbrzmqxucyc", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("oclxiut", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("cyzyzjdnrqjbt", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("eaoqaqbzgyhf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("v", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("tbwbqamteuli", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("lpkcvmwfauxxep", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("wbormcqmi", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("ijqpkzfbojxjmcs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qwixvcpwnk", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("wzwofalickduo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("tamtyv", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("ccgzpraoxnyu", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("a", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("gftipwc", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yubhiqdx", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1165708950, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(893248980, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT229H8M42S"), model.limitSettings().timeout()); - Assertions.assertEquals(536414260, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(693878843, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("tteajohiygs", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gdmin", model.validationData().uri()); - Assertions.assertEquals(75.70753002197551D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java deleted file mode 100644 index 2f1c7507aca2c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java +++ /dev/null @@ -1,374 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageInstanceSegmentationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageInstanceSegmentation model = - BinaryData - .fromString( - "{\"taskType\":\"ImageInstanceSegmentation\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":411999278,\"boxScoreThreshold\":18.429447,\"imageSize\":26955343,\"maxSize\":1642764526,\"minSize\":1482263286,\"modelSize\":\"Large\",\"multiScale\":false,\"nmsIouThreshold\":1.44642,\"tileGridSize\":\"ibmq\",\"tileOverlapRatio\":25.447088,\"tilePredictionsNmsThreshold\":69.32719,\"validationIouThreshold\":22.681719,\"validationMetricType\":\"CocoVoc\",\"advancedSettings\":\"u\",\"amsGradient\":false,\"augmentations\":\"etasvvoqsbp\",\"beta1\":60.15215,\"beta2\":97.623566,\"checkpointFrequency\":94750043,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalDownload\",\"uri\":\"yao\",\"description\":\"zowpuohdkcprgukx\"},\"checkpointRunId\":\"tiochlutixmqr\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":917093220,\"earlyStoppingPatience\":1837159570,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1130120951,\"gradientAccumulationStep\":695678022,\"layersToFreeze\":1955906279,\"learningRate\":2.7083278,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"bcpaqktkrumzued\",\"momentum\":70.79762,\"nesterov\":false,\"numberOfEpochs\":306505202,\"numberOfWorkers\":886379161,\"optimizer\":\"Adam\",\"randomSeed\":113581490,\"stepLRGamma\":42.95044,\"stepLRStepSize\":1447634405,\"trainingBatchSize\":1828475728,\"validationBatchSize\":91831981,\"warmupCosineLRCycles\":61.42521,\"warmupCosineLRWarmupEpochs\":2131168360,\"weightDecay\":87.82275},\"searchSpace\":[{\"boxDetectionsPerImage\":\"qggjhf\",\"boxScoreThreshold\":\"xrqrkijpeuqlsd\",\"imageSize\":\"qztvx\",\"maxSize\":\"wwmjs\",\"minSize\":\"na\",\"modelSize\":\"amecle\",\"multiScale\":\"oulndhzyoeojhto\",\"nmsIouThreshold\":\"h\",\"tileGridSize\":\"idmytzln\",\"tileOverlapRatio\":\"xpno\",\"tilePredictionsNmsThreshold\":\"oanfbcswqagyw\",\"validationIouThreshold\":\"xigvjrktpgaeuk\",\"validationMetricType\":\"wohpmwhqnucs\",\"amsGradient\":\"hsidsjtdlpbnin\",\"augmentations\":\"azlsvbzfcpuo\",\"beta1\":\"dwjcciklhs\",\"beta2\":\"krdre\",\"distributed\":\"olr\",\"earlyStopping\":\"ehqbeivdlhydwbdb\",\"earlyStoppingDelay\":\"rlpunytjlkesmmpa\",\"earlyStoppingPatience\":\"ubt\",\"enableOnnxNormalization\":\"deani\",\"evaluationFrequency\":\"llbvgwzsfftedous\",\"gradientAccumulationStep\":\"tjtgravaqogfkb\",\"layersToFreeze\":\"auzlqbtxxw\",\"learningRate\":\"h\",\"learningRateScheduler\":\"zudrtpzk\",\"modelName\":\"eboywhczzqrhm\",\"momentum\":\"qbedygisrzwn\",\"nesterov\":\"d\",\"numberOfEpochs\":\"jch\",\"numberOfWorkers\":\"mpwctoflds\",\"optimizer\":\"cdhz\",\"randomSeed\":\"kbrfgdrwji\",\"stepLRGamma\":\"whfjsrwqrxe\",\"stepLRStepSize\":\"gcwvrrmdqntycna\",\"trainingBatchSize\":\"hvmaxgnuyeamcmhu\",\"validationBatchSize\":\"jecehokwc\",\"warmupCosineLRCycles\":\"twloesqr\",\"warmupCosineLRWarmupEpochs\":\"vrbnyrukoil\",\"weightDecay\":\"iduw\"}],\"limitSettings\":{\"maxConcurrentTrials\":111210342,\"maxTrials\":844410077,\"timeout\":\"PT37H28M23S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":814563749,\"evaluationInterval\":400227130},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"thqkkwhbgxvellv\",\"description\":\"nxdmnitmujdtv\"},\"validationDataSize\":82.02510999731906,\"logVerbosity\":\"NotSet\",\"targetColumnName\":\"fhmjp\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"yx\",\"description\":\"uvrzmzqmzjqrb\"}}") - .toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("fhmjp", model.targetColumnName()); - Assertions.assertEquals("uvrzmzqmzjqrb", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("yx", model.trainingData().uri()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("u", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("etasvvoqsbp", model.modelSettings().augmentations()); - Assertions.assertEquals(60.15215F, model.modelSettings().beta1()); - Assertions.assertEquals(97.623566F, model.modelSettings().beta2()); - Assertions.assertEquals(94750043, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("zowpuohdkcprgukx", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("yao", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("tiochlutixmqr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(917093220, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1837159570, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1130120951, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(695678022, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1955906279, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(2.7083278F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("bcpaqktkrumzued", model.modelSettings().modelName()); - Assertions.assertEquals(70.79762F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(306505202, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(886379161, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(113581490, model.modelSettings().randomSeed()); - Assertions.assertEquals(42.95044F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1447634405, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1828475728, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(91831981, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(61.42521F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2131168360, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.82275F, model.modelSettings().weightDecay()); - Assertions.assertEquals(411999278, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(18.429447F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(26955343, model.modelSettings().imageSize()); - Assertions.assertEquals(1642764526, model.modelSettings().maxSize()); - Assertions.assertEquals(1482263286, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(1.44642F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("ibmq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(25.447088F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(69.32719F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(22.681719F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("hsidsjtdlpbnin", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("azlsvbzfcpuo", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("dwjcciklhs", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("krdre", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("olr", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("rlpunytjlkesmmpa", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ubt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("deani", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("llbvgwzsfftedous", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("tjtgravaqogfkb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("auzlqbtxxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("h", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("zudrtpzk", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("eboywhczzqrhm", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qbedygisrzwn", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("d", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("jch", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("mpwctoflds", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("cdhz", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("kbrfgdrwji", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("whfjsrwqrxe", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("gcwvrrmdqntycna", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("hvmaxgnuyeamcmhu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("jecehokwc", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("twloesqr", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("vrbnyrukoil", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("iduw", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("qggjhf", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("xrqrkijpeuqlsd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("qztvx", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wwmjs", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("na", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("amecle", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("oulndhzyoeojhto", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("h", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("idmytzln", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpno", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("oanfbcswqagyw", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("xigvjrktpgaeuk", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("wohpmwhqnucs", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(111210342, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(844410077, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT37H28M23S"), model.limitSettings().timeout()); - Assertions.assertEquals(814563749, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(400227130, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nxdmnitmujdtv", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("thqkkwhbgxvellv", model.validationData().uri()); - Assertions.assertEquals(82.02510999731906D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInstanceSegmentation model = - new ImageInstanceSegmentation() - .withLogVerbosity(LogVerbosity.NOT_SET) - .withTargetColumnName("fhmjp") - .withTrainingData( - new MLTableJobInput() - .withDescription("uvrzmzqmzjqrb") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("yx")) - .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("u") - .withAmsGradient(false) - .withAugmentations("etasvvoqsbp") - .withBeta1(60.15215F) - .withBeta2(97.623566F) - .withCheckpointFrequency(94750043) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("zowpuohdkcprgukx") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("yao")) - .withCheckpointRunId("tiochlutixmqr") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(917093220) - .withEarlyStoppingPatience(1837159570) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1130120951) - .withGradientAccumulationStep(695678022) - .withLayersToFreeze(1955906279) - .withLearningRate(2.7083278F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("bcpaqktkrumzued") - .withMomentum(70.79762F) - .withNesterov(false) - .withNumberOfEpochs(306505202) - .withNumberOfWorkers(886379161) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(113581490) - .withStepLRGamma(42.95044F) - .withStepLRStepSize(1447634405) - .withTrainingBatchSize(1828475728) - .withValidationBatchSize(91831981) - .withWarmupCosineLRCycles(61.42521F) - .withWarmupCosineLRWarmupEpochs(2131168360) - .withWeightDecay(87.82275F) - .withBoxDetectionsPerImage(411999278) - .withBoxScoreThreshold(18.429447F) - .withImageSize(26955343) - .withMaxSize(1642764526) - .withMinSize(1482263286) - .withModelSize(ModelSize.LARGE) - .withMultiScale(false) - .withNmsIouThreshold(1.44642F) - .withTileGridSize("ibmq") - .withTileOverlapRatio(25.447088F) - .withTilePredictionsNmsThreshold(69.32719F) - .withValidationIouThreshold(22.681719F) - .withValidationMetricType(ValidationMetricType.COCO_VOC)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("hsidsjtdlpbnin") - .withAugmentations("azlsvbzfcpuo") - .withBeta1("dwjcciklhs") - .withBeta2("krdre") - .withDistributed("olr") - .withEarlyStopping("ehqbeivdlhydwbdb") - .withEarlyStoppingDelay("rlpunytjlkesmmpa") - .withEarlyStoppingPatience("ubt") - .withEnableOnnxNormalization("deani") - .withEvaluationFrequency("llbvgwzsfftedous") - .withGradientAccumulationStep("tjtgravaqogfkb") - .withLayersToFreeze("auzlqbtxxw") - .withLearningRate("h") - .withLearningRateScheduler("zudrtpzk") - .withModelName("eboywhczzqrhm") - .withMomentum("qbedygisrzwn") - .withNesterov("d") - .withNumberOfEpochs("jch") - .withNumberOfWorkers("mpwctoflds") - .withOptimizer("cdhz") - .withRandomSeed("kbrfgdrwji") - .withStepLRGamma("whfjsrwqrxe") - .withStepLRStepSize("gcwvrrmdqntycna") - .withTrainingBatchSize("hvmaxgnuyeamcmhu") - .withValidationBatchSize("jecehokwc") - .withWarmupCosineLRCycles("twloesqr") - .withWarmupCosineLRWarmupEpochs("vrbnyrukoil") - .withWeightDecay("iduw") - .withBoxDetectionsPerImage("qggjhf") - .withBoxScoreThreshold("xrqrkijpeuqlsd") - .withImageSize("qztvx") - .withMaxSize("wwmjs") - .withMinSize("na") - .withModelSize("amecle") - .withMultiScale("oulndhzyoeojhto") - .withNmsIouThreshold("h") - .withTileGridSize("idmytzln") - .withTileOverlapRatio("xpno") - .withTilePredictionsNmsThreshold("oanfbcswqagyw") - .withValidationIouThreshold("xigvjrktpgaeuk") - .withValidationMetricType("wohpmwhqnucs"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(111210342) - .withMaxTrials(844410077) - .withTimeout(Duration.parse("PT37H28M23S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(814563749) - .withEvaluationInterval(400227130)) - .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) - .withValidationData( - new MLTableJobInput() - .withDescription("nxdmnitmujdtv") - .withMode(InputDeliveryMode.DIRECT) - .withUri("thqkkwhbgxvellv")) - .withValidationDataSize(82.02510999731906D); - model = BinaryData.fromObject(model).toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("fhmjp", model.targetColumnName()); - Assertions.assertEquals("uvrzmzqmzjqrb", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("yx", model.trainingData().uri()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("u", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("etasvvoqsbp", model.modelSettings().augmentations()); - Assertions.assertEquals(60.15215F, model.modelSettings().beta1()); - Assertions.assertEquals(97.623566F, model.modelSettings().beta2()); - Assertions.assertEquals(94750043, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("zowpuohdkcprgukx", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("yao", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("tiochlutixmqr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(917093220, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1837159570, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1130120951, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(695678022, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1955906279, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(2.7083278F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("bcpaqktkrumzued", model.modelSettings().modelName()); - Assertions.assertEquals(70.79762F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(306505202, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(886379161, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(113581490, model.modelSettings().randomSeed()); - Assertions.assertEquals(42.95044F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1447634405, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1828475728, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(91831981, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(61.42521F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2131168360, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.82275F, model.modelSettings().weightDecay()); - Assertions.assertEquals(411999278, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(18.429447F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(26955343, model.modelSettings().imageSize()); - Assertions.assertEquals(1642764526, model.modelSettings().maxSize()); - Assertions.assertEquals(1482263286, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(1.44642F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("ibmq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(25.447088F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(69.32719F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(22.681719F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("hsidsjtdlpbnin", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("azlsvbzfcpuo", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("dwjcciklhs", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("krdre", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("olr", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("rlpunytjlkesmmpa", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ubt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("deani", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("llbvgwzsfftedous", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("tjtgravaqogfkb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("auzlqbtxxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("h", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("zudrtpzk", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("eboywhczzqrhm", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qbedygisrzwn", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("d", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("jch", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("mpwctoflds", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("cdhz", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("kbrfgdrwji", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("whfjsrwqrxe", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("gcwvrrmdqntycna", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("hvmaxgnuyeamcmhu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("jecehokwc", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("twloesqr", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("vrbnyrukoil", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("iduw", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("qggjhf", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("xrqrkijpeuqlsd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("qztvx", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wwmjs", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("na", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("amecle", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("oulndhzyoeojhto", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("h", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("idmytzln", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpno", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("oanfbcswqagyw", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("xigvjrktpgaeuk", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("wohpmwhqnucs", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(111210342, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(844410077, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT37H28M23S"), model.limitSettings().timeout()); - Assertions.assertEquals(814563749, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(400227130, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nxdmnitmujdtv", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("thqkkwhbgxvellv", model.validationData().uri()); - Assertions.assertEquals(82.02510999731906D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java deleted file mode 100644 index 6cb12aca74fbf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java +++ /dev/null @@ -1,36 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageLimitSettings model = - BinaryData - .fromString("{\"maxConcurrentTrials\":543709562,\"maxTrials\":848455814,\"timeout\":\"PT224H41M46S\"}") - .toObject(ImageLimitSettings.class); - Assertions.assertEquals(543709562, model.maxConcurrentTrials()); - Assertions.assertEquals(848455814, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT224H41M46S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageLimitSettings model = - new ImageLimitSettings() - .withMaxConcurrentTrials(543709562) - .withMaxTrials(848455814) - .withTimeout(Duration.parse("PT224H41M46S")); - model = BinaryData.fromObject(model).toObject(ImageLimitSettings.class); - Assertions.assertEquals(543709562, model.maxConcurrentTrials()); - Assertions.assertEquals(848455814, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT224H41M46S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java deleted file mode 100644 index b8076b71567dc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsClassification model = - BinaryData - .fromString( - "{\"trainingCropSize\":\"jmfczlfsyqkf\",\"validationCropSize\":\"zgowox\",\"validationResizeSize\":\"je\",\"weightedLoss\":\"cxn\",\"amsGradient\":\"gxhlusr\",\"augmentations\":\"i\",\"beta1\":\"mjceagbjqvls\",\"beta2\":\"ywzash\",\"distributed\":\"onoyjf\",\"earlyStopping\":\"puby\",\"earlyStoppingDelay\":\"clkfkee\",\"earlyStoppingPatience\":\"vop\",\"enableOnnxNormalization\":\"tuoqujlyegqavni\",\"evaluationFrequency\":\"lqqbtnyjpylxdbfv\",\"gradientAccumulationStep\":\"mvmsxbae\",\"layersToFreeze\":\"jcnkottlwu\",\"learningRate\":\"ajmailfemjjza\",\"learningRateScheduler\":\"wjiqullqxb\",\"modelName\":\"vr\",\"momentum\":\"mqerndb\",\"nesterov\":\"yeofltfnnxrkad\",\"numberOfEpochs\":\"ynnfmuiii\",\"numberOfWorkers\":\"pfoh\",\"optimizer\":\"fkx\",\"randomSeed\":\"cbrwjiutgnjizbe\",\"stepLRGamma\":\"oiymrvzbjuyrsrzi\",\"stepLRStepSize\":\"tixgbd\",\"trainingBatchSize\":\"ifrevk\",\"validationBatchSize\":\"pezkis\",\"warmupCosineLRCycles\":\"jm\",\"warmupCosineLRWarmupEpochs\":\"hsyparybjuf\",\"weightDecay\":\"bjczjnciuiyqvlda\"}") - .toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("gxhlusr", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("mjceagbjqvls", model.beta1()); - Assertions.assertEquals("ywzash", model.beta2()); - Assertions.assertEquals("onoyjf", model.distributed()); - Assertions.assertEquals("puby", model.earlyStopping()); - Assertions.assertEquals("clkfkee", model.earlyStoppingDelay()); - Assertions.assertEquals("vop", model.earlyStoppingPatience()); - Assertions.assertEquals("tuoqujlyegqavni", model.enableOnnxNormalization()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.evaluationFrequency()); - Assertions.assertEquals("mvmsxbae", model.gradientAccumulationStep()); - Assertions.assertEquals("jcnkottlwu", model.layersToFreeze()); - Assertions.assertEquals("ajmailfemjjza", model.learningRate()); - Assertions.assertEquals("wjiqullqxb", model.learningRateScheduler()); - Assertions.assertEquals("vr", model.modelName()); - Assertions.assertEquals("mqerndb", model.momentum()); - Assertions.assertEquals("yeofltfnnxrkad", model.nesterov()); - Assertions.assertEquals("ynnfmuiii", model.numberOfEpochs()); - Assertions.assertEquals("pfoh", model.numberOfWorkers()); - Assertions.assertEquals("fkx", model.optimizer()); - Assertions.assertEquals("cbrwjiutgnjizbe", model.randomSeed()); - Assertions.assertEquals("oiymrvzbjuyrsrzi", model.stepLRGamma()); - Assertions.assertEquals("tixgbd", model.stepLRStepSize()); - Assertions.assertEquals("ifrevk", model.trainingBatchSize()); - Assertions.assertEquals("pezkis", model.validationBatchSize()); - Assertions.assertEquals("jm", model.warmupCosineLRCycles()); - Assertions.assertEquals("hsyparybjuf", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("bjczjnciuiyqvlda", model.weightDecay()); - Assertions.assertEquals("jmfczlfsyqkf", model.trainingCropSize()); - Assertions.assertEquals("zgowox", model.validationCropSize()); - Assertions.assertEquals("je", model.validationResizeSize()); - Assertions.assertEquals("cxn", model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsClassification model = - new ImageModelDistributionSettingsClassification() - .withAmsGradient("gxhlusr") - .withAugmentations("i") - .withBeta1("mjceagbjqvls") - .withBeta2("ywzash") - .withDistributed("onoyjf") - .withEarlyStopping("puby") - .withEarlyStoppingDelay("clkfkee") - .withEarlyStoppingPatience("vop") - .withEnableOnnxNormalization("tuoqujlyegqavni") - .withEvaluationFrequency("lqqbtnyjpylxdbfv") - .withGradientAccumulationStep("mvmsxbae") - .withLayersToFreeze("jcnkottlwu") - .withLearningRate("ajmailfemjjza") - .withLearningRateScheduler("wjiqullqxb") - .withModelName("vr") - .withMomentum("mqerndb") - .withNesterov("yeofltfnnxrkad") - .withNumberOfEpochs("ynnfmuiii") - .withNumberOfWorkers("pfoh") - .withOptimizer("fkx") - .withRandomSeed("cbrwjiutgnjizbe") - .withStepLRGamma("oiymrvzbjuyrsrzi") - .withStepLRStepSize("tixgbd") - .withTrainingBatchSize("ifrevk") - .withValidationBatchSize("pezkis") - .withWarmupCosineLRCycles("jm") - .withWarmupCosineLRWarmupEpochs("hsyparybjuf") - .withWeightDecay("bjczjnciuiyqvlda") - .withTrainingCropSize("jmfczlfsyqkf") - .withValidationCropSize("zgowox") - .withValidationResizeSize("je") - .withWeightedLoss("cxn"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("gxhlusr", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("mjceagbjqvls", model.beta1()); - Assertions.assertEquals("ywzash", model.beta2()); - Assertions.assertEquals("onoyjf", model.distributed()); - Assertions.assertEquals("puby", model.earlyStopping()); - Assertions.assertEquals("clkfkee", model.earlyStoppingDelay()); - Assertions.assertEquals("vop", model.earlyStoppingPatience()); - Assertions.assertEquals("tuoqujlyegqavni", model.enableOnnxNormalization()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.evaluationFrequency()); - Assertions.assertEquals("mvmsxbae", model.gradientAccumulationStep()); - Assertions.assertEquals("jcnkottlwu", model.layersToFreeze()); - Assertions.assertEquals("ajmailfemjjza", model.learningRate()); - Assertions.assertEquals("wjiqullqxb", model.learningRateScheduler()); - Assertions.assertEquals("vr", model.modelName()); - Assertions.assertEquals("mqerndb", model.momentum()); - Assertions.assertEquals("yeofltfnnxrkad", model.nesterov()); - Assertions.assertEquals("ynnfmuiii", model.numberOfEpochs()); - Assertions.assertEquals("pfoh", model.numberOfWorkers()); - Assertions.assertEquals("fkx", model.optimizer()); - Assertions.assertEquals("cbrwjiutgnjizbe", model.randomSeed()); - Assertions.assertEquals("oiymrvzbjuyrsrzi", model.stepLRGamma()); - Assertions.assertEquals("tixgbd", model.stepLRStepSize()); - Assertions.assertEquals("ifrevk", model.trainingBatchSize()); - Assertions.assertEquals("pezkis", model.validationBatchSize()); - Assertions.assertEquals("jm", model.warmupCosineLRCycles()); - Assertions.assertEquals("hsyparybjuf", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("bjczjnciuiyqvlda", model.weightDecay()); - Assertions.assertEquals("jmfczlfsyqkf", model.trainingCropSize()); - Assertions.assertEquals("zgowox", model.validationCropSize()); - Assertions.assertEquals("je", model.validationResizeSize()); - Assertions.assertEquals("cxn", model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java deleted file mode 100644 index 968465a57c12a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java +++ /dev/null @@ -1,150 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model = - BinaryData - .fromString( - "{\"boxDetectionsPerImage\":\"isubxbteog\",\"boxScoreThreshold\":\"fiijrykwlefksxqc\",\"imageSize\":\"zfpxgnmqvzvluy\",\"maxSize\":\"aiossscyvaifp\",\"minSize\":\"acvfyeowps\",\"modelSize\":\"tjdhsoymhpvtyq\",\"multiScale\":\"tehdpboujs\",\"nmsIouThreshold\":\"fvvdshxcdedsue\",\"tileGridSize\":\"gnxcgjtfrnquktr\",\"tileOverlapRatio\":\"s\",\"tilePredictionsNmsThreshold\":\"lr\",\"validationIouThreshold\":\"myltrwntfmtbg\",\"validationMetricType\":\"dxwnazkurrd\",\"amsGradient\":\"yzjwhsetwwjwzzq\",\"augmentations\":\"uzu\",\"beta1\":\"y\",\"beta2\":\"yqhyqqzzdcykey\",\"distributed\":\"ewfopazdazg\",\"earlyStopping\":\"qgpewqcfutmdpvoz\",\"earlyStoppingDelay\":\"qjbknl\",\"earlyStoppingPatience\":\"lctzeyowmndcovd\",\"enableOnnxNormalization\":\"qauxzan\",\"evaluationFrequency\":\"kvfruwkudr\",\"gradientAccumulationStep\":\"pftxudqyeme\",\"layersToFreeze\":\"naucmcirtnee\",\"learningRate\":\"jauwcgxefnohaitr\",\"learningRateScheduler\":\"izerw\",\"modelName\":\"dasmxu\",\"momentum\":\"fbngfcocef\",\"nesterov\":\"riylfmpztra\",\"numberOfEpochs\":\"svhl\",\"numberOfWorkers\":\"culregpqt\",\"optimizer\":\"jhvrztnvgyshqrdg\",\"randomSeed\":\"wmewjzlpyk\",\"stepLRGamma\":\"azzwjcay\",\"stepLRStepSize\":\"zrransyb\",\"trainingBatchSize\":\"polwzrghsrlei\",\"validationBatchSize\":\"fscjfn\",\"warmupCosineLRCycles\":\"wvuagfqwtl\",\"warmupCosineLRWarmupEpochs\":\"gvmreuptrklzmi\",\"weightDecay\":\"jwolxfsvaghmpynw\"}") - .toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("yzjwhsetwwjwzzq", model.amsGradient()); - Assertions.assertEquals("uzu", model.augmentations()); - Assertions.assertEquals("y", model.beta1()); - Assertions.assertEquals("yqhyqqzzdcykey", model.beta2()); - Assertions.assertEquals("ewfopazdazg", model.distributed()); - Assertions.assertEquals("qgpewqcfutmdpvoz", model.earlyStopping()); - Assertions.assertEquals("qjbknl", model.earlyStoppingDelay()); - Assertions.assertEquals("lctzeyowmndcovd", model.earlyStoppingPatience()); - Assertions.assertEquals("qauxzan", model.enableOnnxNormalization()); - Assertions.assertEquals("kvfruwkudr", model.evaluationFrequency()); - Assertions.assertEquals("pftxudqyeme", model.gradientAccumulationStep()); - Assertions.assertEquals("naucmcirtnee", model.layersToFreeze()); - Assertions.assertEquals("jauwcgxefnohaitr", model.learningRate()); - Assertions.assertEquals("izerw", model.learningRateScheduler()); - Assertions.assertEquals("dasmxu", model.modelName()); - Assertions.assertEquals("fbngfcocef", model.momentum()); - Assertions.assertEquals("riylfmpztra", model.nesterov()); - Assertions.assertEquals("svhl", model.numberOfEpochs()); - Assertions.assertEquals("culregpqt", model.numberOfWorkers()); - Assertions.assertEquals("jhvrztnvgyshqrdg", model.optimizer()); - Assertions.assertEquals("wmewjzlpyk", model.randomSeed()); - Assertions.assertEquals("azzwjcay", model.stepLRGamma()); - Assertions.assertEquals("zrransyb", model.stepLRStepSize()); - Assertions.assertEquals("polwzrghsrlei", model.trainingBatchSize()); - Assertions.assertEquals("fscjfn", model.validationBatchSize()); - Assertions.assertEquals("wvuagfqwtl", model.warmupCosineLRCycles()); - Assertions.assertEquals("gvmreuptrklzmi", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("jwolxfsvaghmpynw", model.weightDecay()); - Assertions.assertEquals("isubxbteog", model.boxDetectionsPerImage()); - Assertions.assertEquals("fiijrykwlefksxqc", model.boxScoreThreshold()); - Assertions.assertEquals("zfpxgnmqvzvluy", model.imageSize()); - Assertions.assertEquals("aiossscyvaifp", model.maxSize()); - Assertions.assertEquals("acvfyeowps", model.minSize()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.modelSize()); - Assertions.assertEquals("tehdpboujs", model.multiScale()); - Assertions.assertEquals("fvvdshxcdedsue", model.nmsIouThreshold()); - Assertions.assertEquals("gnxcgjtfrnquktr", model.tileGridSize()); - Assertions.assertEquals("s", model.tileOverlapRatio()); - Assertions.assertEquals("lr", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("myltrwntfmtbg", model.validationIouThreshold()); - Assertions.assertEquals("dxwnazkurrd", model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model = - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("yzjwhsetwwjwzzq") - .withAugmentations("uzu") - .withBeta1("y") - .withBeta2("yqhyqqzzdcykey") - .withDistributed("ewfopazdazg") - .withEarlyStopping("qgpewqcfutmdpvoz") - .withEarlyStoppingDelay("qjbknl") - .withEarlyStoppingPatience("lctzeyowmndcovd") - .withEnableOnnxNormalization("qauxzan") - .withEvaluationFrequency("kvfruwkudr") - .withGradientAccumulationStep("pftxudqyeme") - .withLayersToFreeze("naucmcirtnee") - .withLearningRate("jauwcgxefnohaitr") - .withLearningRateScheduler("izerw") - .withModelName("dasmxu") - .withMomentum("fbngfcocef") - .withNesterov("riylfmpztra") - .withNumberOfEpochs("svhl") - .withNumberOfWorkers("culregpqt") - .withOptimizer("jhvrztnvgyshqrdg") - .withRandomSeed("wmewjzlpyk") - .withStepLRGamma("azzwjcay") - .withStepLRStepSize("zrransyb") - .withTrainingBatchSize("polwzrghsrlei") - .withValidationBatchSize("fscjfn") - .withWarmupCosineLRCycles("wvuagfqwtl") - .withWarmupCosineLRWarmupEpochs("gvmreuptrklzmi") - .withWeightDecay("jwolxfsvaghmpynw") - .withBoxDetectionsPerImage("isubxbteog") - .withBoxScoreThreshold("fiijrykwlefksxqc") - .withImageSize("zfpxgnmqvzvluy") - .withMaxSize("aiossscyvaifp") - .withMinSize("acvfyeowps") - .withModelSize("tjdhsoymhpvtyq") - .withMultiScale("tehdpboujs") - .withNmsIouThreshold("fvvdshxcdedsue") - .withTileGridSize("gnxcgjtfrnquktr") - .withTileOverlapRatio("s") - .withTilePredictionsNmsThreshold("lr") - .withValidationIouThreshold("myltrwntfmtbg") - .withValidationMetricType("dxwnazkurrd"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("yzjwhsetwwjwzzq", model.amsGradient()); - Assertions.assertEquals("uzu", model.augmentations()); - Assertions.assertEquals("y", model.beta1()); - Assertions.assertEquals("yqhyqqzzdcykey", model.beta2()); - Assertions.assertEquals("ewfopazdazg", model.distributed()); - Assertions.assertEquals("qgpewqcfutmdpvoz", model.earlyStopping()); - Assertions.assertEquals("qjbknl", model.earlyStoppingDelay()); - Assertions.assertEquals("lctzeyowmndcovd", model.earlyStoppingPatience()); - Assertions.assertEquals("qauxzan", model.enableOnnxNormalization()); - Assertions.assertEquals("kvfruwkudr", model.evaluationFrequency()); - Assertions.assertEquals("pftxudqyeme", model.gradientAccumulationStep()); - Assertions.assertEquals("naucmcirtnee", model.layersToFreeze()); - Assertions.assertEquals("jauwcgxefnohaitr", model.learningRate()); - Assertions.assertEquals("izerw", model.learningRateScheduler()); - Assertions.assertEquals("dasmxu", model.modelName()); - Assertions.assertEquals("fbngfcocef", model.momentum()); - Assertions.assertEquals("riylfmpztra", model.nesterov()); - Assertions.assertEquals("svhl", model.numberOfEpochs()); - Assertions.assertEquals("culregpqt", model.numberOfWorkers()); - Assertions.assertEquals("jhvrztnvgyshqrdg", model.optimizer()); - Assertions.assertEquals("wmewjzlpyk", model.randomSeed()); - Assertions.assertEquals("azzwjcay", model.stepLRGamma()); - Assertions.assertEquals("zrransyb", model.stepLRStepSize()); - Assertions.assertEquals("polwzrghsrlei", model.trainingBatchSize()); - Assertions.assertEquals("fscjfn", model.validationBatchSize()); - Assertions.assertEquals("wvuagfqwtl", model.warmupCosineLRCycles()); - Assertions.assertEquals("gvmreuptrklzmi", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("jwolxfsvaghmpynw", model.weightDecay()); - Assertions.assertEquals("isubxbteog", model.boxDetectionsPerImage()); - Assertions.assertEquals("fiijrykwlefksxqc", model.boxScoreThreshold()); - Assertions.assertEquals("zfpxgnmqvzvluy", model.imageSize()); - Assertions.assertEquals("aiossscyvaifp", model.maxSize()); - Assertions.assertEquals("acvfyeowps", model.minSize()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.modelSize()); - Assertions.assertEquals("tehdpboujs", model.multiScale()); - Assertions.assertEquals("fvvdshxcdedsue", model.nmsIouThreshold()); - Assertions.assertEquals("gnxcgjtfrnquktr", model.tileGridSize()); - Assertions.assertEquals("s", model.tileOverlapRatio()); - Assertions.assertEquals("lr", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("myltrwntfmtbg", model.validationIouThreshold()); - Assertions.assertEquals("dxwnazkurrd", model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java deleted file mode 100644 index eff5f61e7e721..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java +++ /dev/null @@ -1,111 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettings model = - BinaryData - .fromString( - "{\"amsGradient\":\"v\",\"augmentations\":\"i\",\"beta1\":\"qzlgcndhzxrrfcfs\",\"beta2\":\"khgsnxuwwkpphefs\",\"distributed\":\"xlb\",\"earlyStopping\":\"omeikjcl\",\"earlyStoppingDelay\":\"acnmwpfsuqtaaz\",\"earlyStoppingPatience\":\"bxyxoy\",\"enableOnnxNormalization\":\"uqqiqezxlhd\",\"evaluationFrequency\":\"qdcadwvps\",\"gradientAccumulationStep\":\"j\",\"layersToFreeze\":\"hjriyb\",\"learningRate\":\"zo\",\"learningRateScheduler\":\"nxwdvwnjkg\",\"modelName\":\"nmx\",\"momentum\":\"rsqftib\",\"nesterov\":\"ibuyvpirf\",\"numberOfEpochs\":\"pnqn\",\"numberOfWorkers\":\"w\",\"optimizer\":\"edenrexkxbhxv\",\"randomSeed\":\"nul\",\"stepLRGamma\":\"nhj\",\"stepLRStepSize\":\"dyznfajsvks\",\"trainingBatchSize\":\"qozzkivyhjrliizj\",\"validationBatchSize\":\"lqfhefkwabs\",\"warmupCosineLRCycles\":\"ron\",\"warmupCosineLRWarmupEpochs\":\"lmgnlqxsjx\",\"weightDecay\":\"lexhv\"}") - .toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("v", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("qzlgcndhzxrrfcfs", model.beta1()); - Assertions.assertEquals("khgsnxuwwkpphefs", model.beta2()); - Assertions.assertEquals("xlb", model.distributed()); - Assertions.assertEquals("omeikjcl", model.earlyStopping()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.earlyStoppingDelay()); - Assertions.assertEquals("bxyxoy", model.earlyStoppingPatience()); - Assertions.assertEquals("uqqiqezxlhd", model.enableOnnxNormalization()); - Assertions.assertEquals("qdcadwvps", model.evaluationFrequency()); - Assertions.assertEquals("j", model.gradientAccumulationStep()); - Assertions.assertEquals("hjriyb", model.layersToFreeze()); - Assertions.assertEquals("zo", model.learningRate()); - Assertions.assertEquals("nxwdvwnjkg", model.learningRateScheduler()); - Assertions.assertEquals("nmx", model.modelName()); - Assertions.assertEquals("rsqftib", model.momentum()); - Assertions.assertEquals("ibuyvpirf", model.nesterov()); - Assertions.assertEquals("pnqn", model.numberOfEpochs()); - Assertions.assertEquals("w", model.numberOfWorkers()); - Assertions.assertEquals("edenrexkxbhxv", model.optimizer()); - Assertions.assertEquals("nul", model.randomSeed()); - Assertions.assertEquals("nhj", model.stepLRGamma()); - Assertions.assertEquals("dyznfajsvks", model.stepLRStepSize()); - Assertions.assertEquals("qozzkivyhjrliizj", model.trainingBatchSize()); - Assertions.assertEquals("lqfhefkwabs", model.validationBatchSize()); - Assertions.assertEquals("ron", model.warmupCosineLRCycles()); - Assertions.assertEquals("lmgnlqxsjx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("lexhv", model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettings model = - new ImageModelDistributionSettings() - .withAmsGradient("v") - .withAugmentations("i") - .withBeta1("qzlgcndhzxrrfcfs") - .withBeta2("khgsnxuwwkpphefs") - .withDistributed("xlb") - .withEarlyStopping("omeikjcl") - .withEarlyStoppingDelay("acnmwpfsuqtaaz") - .withEarlyStoppingPatience("bxyxoy") - .withEnableOnnxNormalization("uqqiqezxlhd") - .withEvaluationFrequency("qdcadwvps") - .withGradientAccumulationStep("j") - .withLayersToFreeze("hjriyb") - .withLearningRate("zo") - .withLearningRateScheduler("nxwdvwnjkg") - .withModelName("nmx") - .withMomentum("rsqftib") - .withNesterov("ibuyvpirf") - .withNumberOfEpochs("pnqn") - .withNumberOfWorkers("w") - .withOptimizer("edenrexkxbhxv") - .withRandomSeed("nul") - .withStepLRGamma("nhj") - .withStepLRStepSize("dyznfajsvks") - .withTrainingBatchSize("qozzkivyhjrliizj") - .withValidationBatchSize("lqfhefkwabs") - .withWarmupCosineLRCycles("ron") - .withWarmupCosineLRWarmupEpochs("lmgnlqxsjx") - .withWeightDecay("lexhv"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("v", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("qzlgcndhzxrrfcfs", model.beta1()); - Assertions.assertEquals("khgsnxuwwkpphefs", model.beta2()); - Assertions.assertEquals("xlb", model.distributed()); - Assertions.assertEquals("omeikjcl", model.earlyStopping()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.earlyStoppingDelay()); - Assertions.assertEquals("bxyxoy", model.earlyStoppingPatience()); - Assertions.assertEquals("uqqiqezxlhd", model.enableOnnxNormalization()); - Assertions.assertEquals("qdcadwvps", model.evaluationFrequency()); - Assertions.assertEquals("j", model.gradientAccumulationStep()); - Assertions.assertEquals("hjriyb", model.layersToFreeze()); - Assertions.assertEquals("zo", model.learningRate()); - Assertions.assertEquals("nxwdvwnjkg", model.learningRateScheduler()); - Assertions.assertEquals("nmx", model.modelName()); - Assertions.assertEquals("rsqftib", model.momentum()); - Assertions.assertEquals("ibuyvpirf", model.nesterov()); - Assertions.assertEquals("pnqn", model.numberOfEpochs()); - Assertions.assertEquals("w", model.numberOfWorkers()); - Assertions.assertEquals("edenrexkxbhxv", model.optimizer()); - Assertions.assertEquals("nul", model.randomSeed()); - Assertions.assertEquals("nhj", model.stepLRGamma()); - Assertions.assertEquals("dyznfajsvks", model.stepLRStepSize()); - Assertions.assertEquals("qozzkivyhjrliizj", model.trainingBatchSize()); - Assertions.assertEquals("lqfhefkwabs", model.validationBatchSize()); - Assertions.assertEquals("ron", model.warmupCosineLRCycles()); - Assertions.assertEquals("lmgnlqxsjx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("lexhv", model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java deleted file mode 100644 index 5f68719c85e16..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java +++ /dev/null @@ -1,147 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsClassification model = - BinaryData - .fromString( - "{\"trainingCropSize\":1924497192,\"validationCropSize\":919883073,\"validationResizeSize\":1735818040,\"weightedLoss\":2030366014,\"advancedSettings\":\"tuicds\",\"amsGradient\":true,\"augmentations\":\"m\",\"beta1\":59.436913,\"beta2\":62.807377,\"checkpointFrequency\":1080891031,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"rgyngydgrpxnca\",\"description\":\"qao\"},\"checkpointRunId\":\"jrkc\",\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1511007702,\"earlyStoppingPatience\":1521830595,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1183182643,\"gradientAccumulationStep\":588395160,\"layersToFreeze\":1092712252,\"learningRate\":63.37043,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"gxhqfgqkayejs\",\"momentum\":38.807606,\"nesterov\":true,\"numberOfEpochs\":390611386,\"numberOfWorkers\":883853554,\"optimizer\":\"None\",\"randomSeed\":9965556,\"stepLRGamma\":33.88037,\"stepLRStepSize\":1346771342,\"trainingBatchSize\":1977652281,\"validationBatchSize\":503751381,\"warmupCosineLRCycles\":23.360283,\"warmupCosineLRWarmupEpochs\":1142072535,\"weightDecay\":68.338776}") - .toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals("tuicds", model.advancedSettings()); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("m", model.augmentations()); - Assertions.assertEquals(59.436913F, model.beta1()); - Assertions.assertEquals(62.807377F, model.beta2()); - Assertions.assertEquals(1080891031, model.checkpointFrequency()); - Assertions.assertEquals("qao", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("rgyngydgrpxnca", model.checkpointModel().uri()); - Assertions.assertEquals("jrkc", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1511007702, model.earlyStoppingDelay()); - Assertions.assertEquals(1521830595, model.earlyStoppingPatience()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1183182643, model.evaluationFrequency()); - Assertions.assertEquals(588395160, model.gradientAccumulationStep()); - Assertions.assertEquals(1092712252, model.layersToFreeze()); - Assertions.assertEquals(63.37043F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("gxhqfgqkayejs", model.modelName()); - Assertions.assertEquals(38.807606F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(390611386, model.numberOfEpochs()); - Assertions.assertEquals(883853554, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(9965556, model.randomSeed()); - Assertions.assertEquals(33.88037F, model.stepLRGamma()); - Assertions.assertEquals(1346771342, model.stepLRStepSize()); - Assertions.assertEquals(1977652281, model.trainingBatchSize()); - Assertions.assertEquals(503751381, model.validationBatchSize()); - Assertions.assertEquals(23.360283F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1142072535, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(68.338776F, model.weightDecay()); - Assertions.assertEquals(1924497192, model.trainingCropSize()); - Assertions.assertEquals(919883073, model.validationCropSize()); - Assertions.assertEquals(1735818040, model.validationResizeSize()); - Assertions.assertEquals(2030366014, model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsClassification model = - new ImageModelSettingsClassification() - .withAdvancedSettings("tuicds") - .withAmsGradient(true) - .withAugmentations("m") - .withBeta1(59.436913F) - .withBeta2(62.807377F) - .withCheckpointFrequency(1080891031) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("qao") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("rgyngydgrpxnca")) - .withCheckpointRunId("jrkc") - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1511007702) - .withEarlyStoppingPatience(1521830595) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1183182643) - .withGradientAccumulationStep(588395160) - .withLayersToFreeze(1092712252) - .withLearningRate(63.37043F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("gxhqfgqkayejs") - .withMomentum(38.807606F) - .withNesterov(true) - .withNumberOfEpochs(390611386) - .withNumberOfWorkers(883853554) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(9965556) - .withStepLRGamma(33.88037F) - .withStepLRStepSize(1346771342) - .withTrainingBatchSize(1977652281) - .withValidationBatchSize(503751381) - .withWarmupCosineLRCycles(23.360283F) - .withWarmupCosineLRWarmupEpochs(1142072535) - .withWeightDecay(68.338776F) - .withTrainingCropSize(1924497192) - .withValidationCropSize(919883073) - .withValidationResizeSize(1735818040) - .withWeightedLoss(2030366014); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals("tuicds", model.advancedSettings()); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("m", model.augmentations()); - Assertions.assertEquals(59.436913F, model.beta1()); - Assertions.assertEquals(62.807377F, model.beta2()); - Assertions.assertEquals(1080891031, model.checkpointFrequency()); - Assertions.assertEquals("qao", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("rgyngydgrpxnca", model.checkpointModel().uri()); - Assertions.assertEquals("jrkc", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1511007702, model.earlyStoppingDelay()); - Assertions.assertEquals(1521830595, model.earlyStoppingPatience()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1183182643, model.evaluationFrequency()); - Assertions.assertEquals(588395160, model.gradientAccumulationStep()); - Assertions.assertEquals(1092712252, model.layersToFreeze()); - Assertions.assertEquals(63.37043F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("gxhqfgqkayejs", model.modelName()); - Assertions.assertEquals(38.807606F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(390611386, model.numberOfEpochs()); - Assertions.assertEquals(883853554, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(9965556, model.randomSeed()); - Assertions.assertEquals(33.88037F, model.stepLRGamma()); - Assertions.assertEquals(1346771342, model.stepLRStepSize()); - Assertions.assertEquals(1977652281, model.trainingBatchSize()); - Assertions.assertEquals(503751381, model.validationBatchSize()); - Assertions.assertEquals(23.360283F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1142072535, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(68.338776F, model.weightDecay()); - Assertions.assertEquals(1924497192, model.trainingCropSize()); - Assertions.assertEquals(919883073, model.validationCropSize()); - Assertions.assertEquals(1735818040, model.validationResizeSize()); - Assertions.assertEquals(2030366014, model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java deleted file mode 100644 index 71eeb63331538..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java +++ /dev/null @@ -1,176 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsObjectDetection model = - BinaryData - .fromString( - "{\"boxDetectionsPerImage\":101641984,\"boxScoreThreshold\":16.755789,\"imageSize\":1076058960,\"maxSize\":191759687,\"minSize\":1378586528,\"modelSize\":\"ExtraLarge\",\"multiScale\":true,\"nmsIouThreshold\":18.348568,\"tileGridSize\":\"ljzgdy\",\"tileOverlapRatio\":96.23886,\"tilePredictionsNmsThreshold\":36.949356,\"validationIouThreshold\":45.30077,\"validationMetricType\":\"CocoVoc\",\"advancedSettings\":\"rqhbjnqogdxwbsfp\",\"amsGradient\":false,\"augmentations\":\"jlf\",\"beta1\":75.122604,\"beta2\":77.73417,\"checkpointFrequency\":1341111685,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"jluxxdhi\",\"description\":\"zd\"},\"checkpointRunId\":\"qjm\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":954713869,\"earlyStoppingPatience\":1623513694,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1227246383,\"gradientAccumulationStep\":445418051,\"layersToFreeze\":1633383721,\"learningRate\":20.159918,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"znkcqwwxwjy\",\"momentum\":68.34347,\"nesterov\":true,\"numberOfEpochs\":370561675,\"numberOfWorkers\":561740795,\"optimizer\":\"None\",\"randomSeed\":1563473495,\"stepLRGamma\":32.891335,\"stepLRStepSize\":795985008,\"trainingBatchSize\":485145114,\"validationBatchSize\":638318099,\"warmupCosineLRCycles\":34.38207,\"warmupCosineLRWarmupEpochs\":771716822,\"weightDecay\":76.72818}") - .toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals("rqhbjnqogdxwbsfp", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("jlf", model.augmentations()); - Assertions.assertEquals(75.122604F, model.beta1()); - Assertions.assertEquals(77.73417F, model.beta2()); - Assertions.assertEquals(1341111685, model.checkpointFrequency()); - Assertions.assertEquals("zd", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("jluxxdhi", model.checkpointModel().uri()); - Assertions.assertEquals("qjm", model.checkpointRunId()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(954713869, model.earlyStoppingDelay()); - Assertions.assertEquals(1623513694, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(1227246383, model.evaluationFrequency()); - Assertions.assertEquals(445418051, model.gradientAccumulationStep()); - Assertions.assertEquals(1633383721, model.layersToFreeze()); - Assertions.assertEquals(20.159918F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("znkcqwwxwjy", model.modelName()); - Assertions.assertEquals(68.34347F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(370561675, model.numberOfEpochs()); - Assertions.assertEquals(561740795, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1563473495, model.randomSeed()); - Assertions.assertEquals(32.891335F, model.stepLRGamma()); - Assertions.assertEquals(795985008, model.stepLRStepSize()); - Assertions.assertEquals(485145114, model.trainingBatchSize()); - Assertions.assertEquals(638318099, model.validationBatchSize()); - Assertions.assertEquals(34.38207F, model.warmupCosineLRCycles()); - Assertions.assertEquals(771716822, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(76.72818F, model.weightDecay()); - Assertions.assertEquals(101641984, model.boxDetectionsPerImage()); - Assertions.assertEquals(16.755789F, model.boxScoreThreshold()); - Assertions.assertEquals(1076058960, model.imageSize()); - Assertions.assertEquals(191759687, model.maxSize()); - Assertions.assertEquals(1378586528, model.minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSize()); - Assertions.assertEquals(true, model.multiScale()); - Assertions.assertEquals(18.348568F, model.nmsIouThreshold()); - Assertions.assertEquals("ljzgdy", model.tileGridSize()); - Assertions.assertEquals(96.23886F, model.tileOverlapRatio()); - Assertions.assertEquals(36.949356F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(45.30077F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsObjectDetection model = - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("rqhbjnqogdxwbsfp") - .withAmsGradient(false) - .withAugmentations("jlf") - .withBeta1(75.122604F) - .withBeta2(77.73417F) - .withCheckpointFrequency(1341111685) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("zd") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("jluxxdhi")) - .withCheckpointRunId("qjm") - .withDistributed(false) - .withEarlyStopping(false) - .withEarlyStoppingDelay(954713869) - .withEarlyStoppingPatience(1623513694) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1227246383) - .withGradientAccumulationStep(445418051) - .withLayersToFreeze(1633383721) - .withLearningRate(20.159918F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("znkcqwwxwjy") - .withMomentum(68.34347F) - .withNesterov(true) - .withNumberOfEpochs(370561675) - .withNumberOfWorkers(561740795) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1563473495) - .withStepLRGamma(32.891335F) - .withStepLRStepSize(795985008) - .withTrainingBatchSize(485145114) - .withValidationBatchSize(638318099) - .withWarmupCosineLRCycles(34.38207F) - .withWarmupCosineLRWarmupEpochs(771716822) - .withWeightDecay(76.72818F) - .withBoxDetectionsPerImage(101641984) - .withBoxScoreThreshold(16.755789F) - .withImageSize(1076058960) - .withMaxSize(191759687) - .withMinSize(1378586528) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(true) - .withNmsIouThreshold(18.348568F) - .withTileGridSize("ljzgdy") - .withTileOverlapRatio(96.23886F) - .withTilePredictionsNmsThreshold(36.949356F) - .withValidationIouThreshold(45.30077F) - .withValidationMetricType(ValidationMetricType.COCO_VOC); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals("rqhbjnqogdxwbsfp", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("jlf", model.augmentations()); - Assertions.assertEquals(75.122604F, model.beta1()); - Assertions.assertEquals(77.73417F, model.beta2()); - Assertions.assertEquals(1341111685, model.checkpointFrequency()); - Assertions.assertEquals("zd", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("jluxxdhi", model.checkpointModel().uri()); - Assertions.assertEquals("qjm", model.checkpointRunId()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(954713869, model.earlyStoppingDelay()); - Assertions.assertEquals(1623513694, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(1227246383, model.evaluationFrequency()); - Assertions.assertEquals(445418051, model.gradientAccumulationStep()); - Assertions.assertEquals(1633383721, model.layersToFreeze()); - Assertions.assertEquals(20.159918F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("znkcqwwxwjy", model.modelName()); - Assertions.assertEquals(68.34347F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(370561675, model.numberOfEpochs()); - Assertions.assertEquals(561740795, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1563473495, model.randomSeed()); - Assertions.assertEquals(32.891335F, model.stepLRGamma()); - Assertions.assertEquals(795985008, model.stepLRStepSize()); - Assertions.assertEquals(485145114, model.trainingBatchSize()); - Assertions.assertEquals(638318099, model.validationBatchSize()); - Assertions.assertEquals(34.38207F, model.warmupCosineLRCycles()); - Assertions.assertEquals(771716822, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(76.72818F, model.weightDecay()); - Assertions.assertEquals(101641984, model.boxDetectionsPerImage()); - Assertions.assertEquals(16.755789F, model.boxScoreThreshold()); - Assertions.assertEquals(1076058960, model.imageSize()); - Assertions.assertEquals(191759687, model.maxSize()); - Assertions.assertEquals(1378586528, model.minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSize()); - Assertions.assertEquals(true, model.multiScale()); - Assertions.assertEquals(18.348568F, model.nmsIouThreshold()); - Assertions.assertEquals("ljzgdy", model.tileGridSize()); - Assertions.assertEquals(96.23886F, model.tileOverlapRatio()); - Assertions.assertEquals(36.949356F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(45.30077F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java deleted file mode 100644 index 432642cac511b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java +++ /dev/null @@ -1,135 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettings model = - BinaryData - .fromString( - "{\"advancedSettings\":\"va\",\"amsGradient\":false,\"augmentations\":\"zknxkv\",\"beta1\":37.521465,\"beta2\":75.73106,\"checkpointFrequency\":2099620376,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"mignohikkg\",\"description\":\"g\"},\"checkpointRunId\":\"pinde\",\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1931875786,\"earlyStoppingPatience\":1421822703,\"enableOnnxNormalization\":false,\"evaluationFrequency\":785027108,\"gradientAccumulationStep\":332997027,\"layersToFreeze\":1895771662,\"learningRate\":85.75601,\"learningRateScheduler\":\"None\",\"modelName\":\"zir\",\"momentum\":31.809593,\"nesterov\":true,\"numberOfEpochs\":1519861948,\"numberOfWorkers\":833365863,\"optimizer\":\"None\",\"randomSeed\":688700290,\"stepLRGamma\":36.495888,\"stepLRStepSize\":829672692,\"trainingBatchSize\":1420035701,\"validationBatchSize\":450644888,\"warmupCosineLRCycles\":51.71764,\"warmupCosineLRWarmupEpochs\":1150687421,\"weightDecay\":80.28705}") - .toObject(ImageModelSettings.class); - Assertions.assertEquals("va", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("zknxkv", model.augmentations()); - Assertions.assertEquals(37.521465F, model.beta1()); - Assertions.assertEquals(75.73106F, model.beta2()); - Assertions.assertEquals(2099620376, model.checkpointFrequency()); - Assertions.assertEquals("g", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("mignohikkg", model.checkpointModel().uri()); - Assertions.assertEquals("pinde", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1931875786, model.earlyStoppingDelay()); - Assertions.assertEquals(1421822703, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(785027108, model.evaluationFrequency()); - Assertions.assertEquals(332997027, model.gradientAccumulationStep()); - Assertions.assertEquals(1895771662, model.layersToFreeze()); - Assertions.assertEquals(85.75601F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("zir", model.modelName()); - Assertions.assertEquals(31.809593F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(1519861948, model.numberOfEpochs()); - Assertions.assertEquals(833365863, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(688700290, model.randomSeed()); - Assertions.assertEquals(36.495888F, model.stepLRGamma()); - Assertions.assertEquals(829672692, model.stepLRStepSize()); - Assertions.assertEquals(1420035701, model.trainingBatchSize()); - Assertions.assertEquals(450644888, model.validationBatchSize()); - Assertions.assertEquals(51.71764F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1150687421, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.28705F, model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettings model = - new ImageModelSettings() - .withAdvancedSettings("va") - .withAmsGradient(false) - .withAugmentations("zknxkv") - .withBeta1(37.521465F) - .withBeta2(75.73106F) - .withCheckpointFrequency(2099620376) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("g") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("mignohikkg")) - .withCheckpointRunId("pinde") - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1931875786) - .withEarlyStoppingPatience(1421822703) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(785027108) - .withGradientAccumulationStep(332997027) - .withLayersToFreeze(1895771662) - .withLearningRate(85.75601F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("zir") - .withMomentum(31.809593F) - .withNesterov(true) - .withNumberOfEpochs(1519861948) - .withNumberOfWorkers(833365863) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(688700290) - .withStepLRGamma(36.495888F) - .withStepLRStepSize(829672692) - .withTrainingBatchSize(1420035701) - .withValidationBatchSize(450644888) - .withWarmupCosineLRCycles(51.71764F) - .withWarmupCosineLRWarmupEpochs(1150687421) - .withWeightDecay(80.28705F); - model = BinaryData.fromObject(model).toObject(ImageModelSettings.class); - Assertions.assertEquals("va", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("zknxkv", model.augmentations()); - Assertions.assertEquals(37.521465F, model.beta1()); - Assertions.assertEquals(75.73106F, model.beta2()); - Assertions.assertEquals(2099620376, model.checkpointFrequency()); - Assertions.assertEquals("g", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("mignohikkg", model.checkpointModel().uri()); - Assertions.assertEquals("pinde", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1931875786, model.earlyStoppingDelay()); - Assertions.assertEquals(1421822703, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(785027108, model.evaluationFrequency()); - Assertions.assertEquals(332997027, model.gradientAccumulationStep()); - Assertions.assertEquals(1895771662, model.layersToFreeze()); - Assertions.assertEquals(85.75601F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("zir", model.modelName()); - Assertions.assertEquals(31.809593F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(1519861948, model.numberOfEpochs()); - Assertions.assertEquals(833365863, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(688700290, model.randomSeed()); - Assertions.assertEquals(36.495888F, model.stepLRGamma()); - Assertions.assertEquals(829672692, model.stepLRStepSize()); - Assertions.assertEquals(1420035701, model.trainingBatchSize()); - Assertions.assertEquals(450644888, model.validationBatchSize()); - Assertions.assertEquals(51.71764F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1150687421, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.28705F, model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java deleted file mode 100644 index 563ad809fa991..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java +++ /dev/null @@ -1,394 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetectionBase model = - BinaryData - .fromString( - "{\"modelSettings\":{\"boxDetectionsPerImage\":220622186,\"boxScoreThreshold\":34.980453,\"imageSize\":1257411321,\"maxSize\":921466837,\"minSize\":2015686275,\"modelSize\":\"None\",\"multiScale\":false,\"nmsIouThreshold\":0.77554584,\"tileGridSize\":\"aohoqkpjtnq\",\"tileOverlapRatio\":5.6527376,\"tilePredictionsNmsThreshold\":62.38328,\"validationIouThreshold\":84.67642,\"validationMetricType\":\"None\",\"advancedSettings\":\"m\",\"amsGradient\":true,\"augmentations\":\"ilm\",\"beta1\":66.63753,\"beta2\":77.31098,\"checkpointFrequency\":1645404857,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"nkkbjpjvlywltmfw\",\"description\":\"bjwhlwyjfnqzocr\"},\"checkpointRunId\":\"gczeuntgx\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":1555790042,\"earlyStoppingPatience\":1557956860,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1852855933,\"gradientAccumulationStep\":1891446844,\"layersToFreeze\":888077010,\"learningRate\":91.16553,\"learningRateScheduler\":\"None\",\"modelName\":\"xgyrihlgmgbehlqt\",\"momentum\":35.669476,\"nesterov\":true,\"numberOfEpochs\":2104814940,\"numberOfWorkers\":2146718478,\"optimizer\":\"None\",\"randomSeed\":961397870,\"stepLRGamma\":84.43488,\"stepLRStepSize\":1159798592,\"trainingBatchSize\":1968957759,\"validationBatchSize\":1595039473,\"warmupCosineLRCycles\":26.42473,\"warmupCosineLRWarmupEpochs\":1300894444,\"weightDecay\":80.86428},\"searchSpace\":[{\"boxDetectionsPerImage\":\"gsabvcipowzafc\",\"boxScoreThreshold\":\"umljcirvpef\",\"imageSize\":\"dvei\",\"maxSize\":\"tjnsx\",\"minSize\":\"jlnsj\",\"modelSize\":\"ju\",\"multiScale\":\"xbxq\",\"nmsIouThreshold\":\"vuaytuad\",\"tileGridSize\":\"xeqbwp\",\"tileOverlapRatio\":\"ghyksarcdrnxs\",\"tilePredictionsNmsThreshold\":\"vlzladl\",\"validationIouThreshold\":\"kpbqhvfdqqjw\",\"validationMetricType\":\"hwzdanojisgglmv\",\"amsGradient\":\"atuztjct\",\"augmentations\":\"pvbkaehxsmzyg\",\"beta1\":\"wakwseivmakxhys\",\"beta2\":\"ljuxl\",\"distributed\":\"ect\",\"earlyStopping\":\"fjmskdchmaiu\",\"earlyStoppingDelay\":\"vlzw\",\"earlyStoppingPatience\":\"gmfalkzazmgoked\",\"enableOnnxNormalization\":\"qafkmkrokzrth\",\"evaluationFrequency\":\"twpqrtva\",\"gradientAccumulationStep\":\"nqnixiezeagmce\",\"layersToFreeze\":\"uugedhfp\",\"learningRate\":\"tlzm\",\"learningRateScheduler\":\"syjdeolctae\",\"modelName\":\"syrled\",\"momentum\":\"ustbvtqigdx\",\"nesterov\":\"sgeafgfosehx\",\"numberOfEpochs\":\"sxezppkkwaa\",\"numberOfWorkers\":\"k\",\"optimizer\":\"jlpzeqtoyrp\",\"randomSeed\":\"xlaj\",\"stepLRGamma\":\"lpquevhamfow\",\"stepLRStepSize\":\"btmkekxpkzwaq\",\"trainingBatchSize\":\"fqovc\",\"validationBatchSize\":\"qbplvfiduszte\",\"warmupCosineLRCycles\":\"byjgmsfepx\",\"warmupCosineLRWarmupEpochs\":\"hpqadagrhrdicxdw\",\"weightDecay\":\"fowxwyovcxjsgbi\"},{\"boxDetectionsPerImage\":\"ukdveksbuhoduc\",\"boxScoreThreshold\":\"lscrdpibfdyjduss\",\"imageSize\":\"szekbh\",\"maxSize\":\"kaaggkreh\",\"minSize\":\"rnuybffljfii\",\"modelSize\":\"eoagsqta\",\"multiScale\":\"usrexxf\",\"nmsIouThreshold\":\"sqwudohzilfmnli\",\"tileGridSize\":\"simsfeypofqpmb\",\"tileOverlapRatio\":\"qgsdr\",\"tilePredictionsNmsThreshold\":\"ttjxophgerhsmvgo\",\"validationIouThreshold\":\"wzm\",\"validationMetricType\":\"lrixysfnimsq\",\"amsGradient\":\"wwmhkruwae\",\"augmentations\":\"ympmlqoin\",\"beta1\":\"duewihapfj\",\"beta2\":\"knjdiqfliejhp\",\"distributed\":\"bi\",\"earlyStopping\":\"fsbw\",\"earlyStoppingDelay\":\"ivbvzi\",\"earlyStoppingPatience\":\"wxgoooxzpra\",\"enableOnnxNormalization\":\"s\",\"evaluationFrequency\":\"knpdgzigjsu\",\"gradientAccumulationStep\":\"whgsaodkww\",\"layersToFreeze\":\"afoctohz\",\"learningRate\":\"quvwsxbgn\",\"learningRateScheduler\":\"ervqchoadhrsxqvz\",\"modelName\":\"pabdsrg\",\"momentum\":\"jglzrsubklrxhjnl\",\"nesterov\":\"etjdvqydieqqkwa\",\"numberOfEpochs\":\"wdxvqzxoebwg\",\"numberOfWorkers\":\"bibanbau\",\"optimizer\":\"tzvp\",\"randomSeed\":\"lozkxbzrp\",\"stepLRGamma\":\"plssanbtttk\",\"stepLRStepSize\":\"uxunrswg\",\"trainingBatchSize\":\"jhboyikebhuhks\",\"validationBatchSize\":\"wlokhueoijyzcq\",\"warmupCosineLRCycles\":\"zqzu\",\"warmupCosineLRWarmupEpochs\":\"s\",\"weightDecay\":\"ej\"}],\"limitSettings\":{\"maxConcurrentTrials\":1158343098,\"maxTrials\":2133185621,\"timeout\":\"PT173H26M33S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1464302974,\"evaluationInterval\":539908072},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"cf\",\"description\":\"bmxsnxoc\"},\"validationDataSize\":82.41225782753845}") - .toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(2133185621, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout()); - Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("bmxsnxoc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("cf", model.validationData().uri()); - Assertions.assertEquals(82.41225782753845D, model.validationDataSize()); - Assertions.assertEquals("m", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ilm", model.modelSettings().augmentations()); - Assertions.assertEquals(66.63753F, model.modelSettings().beta1()); - Assertions.assertEquals(77.31098F, model.modelSettings().beta2()); - Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(91.16553F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName()); - Assertions.assertEquals(35.669476F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(961397870, model.modelSettings().randomSeed()); - Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay()); - Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1257411321, model.modelSettings().imageSize()); - Assertions.assertEquals(921466837, model.modelSettings().maxSize()); - Assertions.assertEquals(2015686275, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("ect", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetectionBase model = - new ImageObjectDetectionBase() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1158343098) - .withMaxTrials(2133185621) - .withTimeout(Duration.parse("PT173H26M33S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1464302974) - .withEvaluationInterval(539908072)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID)) - .withValidationData( - new MLTableJobInput() - .withDescription("bmxsnxoc") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("cf")) - .withValidationDataSize(82.41225782753845D) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("m") - .withAmsGradient(true) - .withAugmentations("ilm") - .withBeta1(66.63753F) - .withBeta2(77.31098F) - .withCheckpointFrequency(1645404857) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("bjwhlwyjfnqzocr") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("nkkbjpjvlywltmfw")) - .withCheckpointRunId("gczeuntgx") - .withDistributed(false) - .withEarlyStopping(false) - .withEarlyStoppingDelay(1555790042) - .withEarlyStoppingPatience(1557956860) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1852855933) - .withGradientAccumulationStep(1891446844) - .withLayersToFreeze(888077010) - .withLearningRate(91.16553F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("xgyrihlgmgbehlqt") - .withMomentum(35.669476F) - .withNesterov(true) - .withNumberOfEpochs(2104814940) - .withNumberOfWorkers(2146718478) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(961397870) - .withStepLRGamma(84.43488F) - .withStepLRStepSize(1159798592) - .withTrainingBatchSize(1968957759) - .withValidationBatchSize(1595039473) - .withWarmupCosineLRCycles(26.42473F) - .withWarmupCosineLRWarmupEpochs(1300894444) - .withWeightDecay(80.86428F) - .withBoxDetectionsPerImage(220622186) - .withBoxScoreThreshold(34.980453F) - .withImageSize(1257411321) - .withMaxSize(921466837) - .withMinSize(2015686275) - .withModelSize(ModelSize.NONE) - .withMultiScale(false) - .withNmsIouThreshold(0.77554584F) - .withTileGridSize("aohoqkpjtnq") - .withTileOverlapRatio(5.6527376F) - .withTilePredictionsNmsThreshold(62.38328F) - .withValidationIouThreshold(84.67642F) - .withValidationMetricType(ValidationMetricType.NONE)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("atuztjct") - .withAugmentations("pvbkaehxsmzyg") - .withBeta1("wakwseivmakxhys") - .withBeta2("ljuxl") - .withDistributed("ect") - .withEarlyStopping("fjmskdchmaiu") - .withEarlyStoppingDelay("vlzw") - .withEarlyStoppingPatience("gmfalkzazmgoked") - .withEnableOnnxNormalization("qafkmkrokzrth") - .withEvaluationFrequency("twpqrtva") - .withGradientAccumulationStep("nqnixiezeagmce") - .withLayersToFreeze("uugedhfp") - .withLearningRate("tlzm") - .withLearningRateScheduler("syjdeolctae") - .withModelName("syrled") - .withMomentum("ustbvtqigdx") - .withNesterov("sgeafgfosehx") - .withNumberOfEpochs("sxezppkkwaa") - .withNumberOfWorkers("k") - .withOptimizer("jlpzeqtoyrp") - .withRandomSeed("xlaj") - .withStepLRGamma("lpquevhamfow") - .withStepLRStepSize("btmkekxpkzwaq") - .withTrainingBatchSize("fqovc") - .withValidationBatchSize("qbplvfiduszte") - .withWarmupCosineLRCycles("byjgmsfepx") - .withWarmupCosineLRWarmupEpochs("hpqadagrhrdicxdw") - .withWeightDecay("fowxwyovcxjsgbi") - .withBoxDetectionsPerImage("gsabvcipowzafc") - .withBoxScoreThreshold("umljcirvpef") - .withImageSize("dvei") - .withMaxSize("tjnsx") - .withMinSize("jlnsj") - .withModelSize("ju") - .withMultiScale("xbxq") - .withNmsIouThreshold("vuaytuad") - .withTileGridSize("xeqbwp") - .withTileOverlapRatio("ghyksarcdrnxs") - .withTilePredictionsNmsThreshold("vlzladl") - .withValidationIouThreshold("kpbqhvfdqqjw") - .withValidationMetricType("hwzdanojisgglmv"), - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("wwmhkruwae") - .withAugmentations("ympmlqoin") - .withBeta1("duewihapfj") - .withBeta2("knjdiqfliejhp") - .withDistributed("bi") - .withEarlyStopping("fsbw") - .withEarlyStoppingDelay("ivbvzi") - .withEarlyStoppingPatience("wxgoooxzpra") - .withEnableOnnxNormalization("s") - .withEvaluationFrequency("knpdgzigjsu") - .withGradientAccumulationStep("whgsaodkww") - .withLayersToFreeze("afoctohz") - .withLearningRate("quvwsxbgn") - .withLearningRateScheduler("ervqchoadhrsxqvz") - .withModelName("pabdsrg") - .withMomentum("jglzrsubklrxhjnl") - .withNesterov("etjdvqydieqqkwa") - .withNumberOfEpochs("wdxvqzxoebwg") - .withNumberOfWorkers("bibanbau") - .withOptimizer("tzvp") - .withRandomSeed("lozkxbzrp") - .withStepLRGamma("plssanbtttk") - .withStepLRStepSize("uxunrswg") - .withTrainingBatchSize("jhboyikebhuhks") - .withValidationBatchSize("wlokhueoijyzcq") - .withWarmupCosineLRCycles("zqzu") - .withWarmupCosineLRWarmupEpochs("s") - .withWeightDecay("ej") - .withBoxDetectionsPerImage("ukdveksbuhoduc") - .withBoxScoreThreshold("lscrdpibfdyjduss") - .withImageSize("szekbh") - .withMaxSize("kaaggkreh") - .withMinSize("rnuybffljfii") - .withModelSize("eoagsqta") - .withMultiScale("usrexxf") - .withNmsIouThreshold("sqwudohzilfmnli") - .withTileGridSize("simsfeypofqpmb") - .withTileOverlapRatio("qgsdr") - .withTilePredictionsNmsThreshold("ttjxophgerhsmvgo") - .withValidationIouThreshold("wzm") - .withValidationMetricType("lrixysfnimsq"))); - model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(2133185621, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout()); - Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("bmxsnxoc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("cf", model.validationData().uri()); - Assertions.assertEquals(82.41225782753845D, model.validationDataSize()); - Assertions.assertEquals("m", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ilm", model.modelSettings().augmentations()); - Assertions.assertEquals(66.63753F, model.modelSettings().beta1()); - Assertions.assertEquals(77.31098F, model.modelSettings().beta2()); - Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(91.16553F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName()); - Assertions.assertEquals(35.669476F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(961397870, model.modelSettings().randomSeed()); - Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay()); - Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1257411321, model.modelSettings().imageSize()); - Assertions.assertEquals(921466837, model.modelSettings().maxSize()); - Assertions.assertEquals(2015686275, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("ect", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java deleted file mode 100644 index 020c235748c2a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java +++ /dev/null @@ -1,374 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetection model = - BinaryData - .fromString( - "{\"taskType\":\"ImageObjectDetection\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":667354640,\"boxScoreThreshold\":57.01898,\"imageSize\":920278919,\"maxSize\":546709544,\"minSize\":1447146223,\"modelSize\":\"Large\",\"multiScale\":true,\"nmsIouThreshold\":58.316856,\"tileGridSize\":\"sovyxpavidnievw\",\"tileOverlapRatio\":21.210634,\"tilePredictionsNmsThreshold\":54.720806,\"validationIouThreshold\":27.970045,\"validationMetricType\":\"Voc\",\"advancedSettings\":\"puxgcbdsvalpnpt\",\"amsGradient\":true,\"augmentations\":\"xgpazwugxyqv\",\"beta1\":72.82474,\"beta2\":87.86046,\"checkpointFrequency\":953919104,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"iuhzzgqlmfa\",\"description\":\"z\"},\"checkpointRunId\":\"udjpxpqht\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":1217471622,\"earlyStoppingPatience\":342924982,\"enableOnnxNormalization\":false,\"evaluationFrequency\":419853623,\"gradientAccumulationStep\":1049447036,\"layersToFreeze\":336351434,\"learningRate\":79.0951,\"learningRateScheduler\":\"None\",\"modelName\":\"uxsp\",\"momentum\":71.59348,\"nesterov\":false,\"numberOfEpochs\":1973063413,\"numberOfWorkers\":1796310561,\"optimizer\":\"Adamw\",\"randomSeed\":1409212705,\"stepLRGamma\":8.159346,\"stepLRStepSize\":99529171,\"trainingBatchSize\":1768553154,\"validationBatchSize\":385248466,\"warmupCosineLRCycles\":70.731415,\"warmupCosineLRWarmupEpochs\":2134877467,\"weightDecay\":72.09128},\"searchSpace\":[{\"boxDetectionsPerImage\":\"axdvwzaehp\",\"boxScoreThreshold\":\"thd\",\"imageSize\":\"mvetatlakfq\",\"maxSize\":\"xwgiks\",\"minSize\":\"vtooxrpo\",\"modelSize\":\"phchgjtnhtukfaci\",\"multiScale\":\"bfntumeezbxvq\",\"nmsIouThreshold\":\"nuvwcgasgomtmjzw\",\"tileGridSize\":\"qgo\",\"tileOverlapRatio\":\"xpwwzt\",\"tilePredictionsNmsThreshold\":\"mkkhtgfredml\",\"validationIouThreshold\":\"grllcc\",\"validationMetricType\":\"ovjowazhpabacom\",\"amsGradient\":\"otgkwsxnsrqorcg\",\"augmentations\":\"mv\",\"beta1\":\"bxeetqujxcxxqn\",\"beta2\":\"qjkedwqurc\",\"distributed\":\"jmrvvxwjongz\",\"earlyStopping\":\"hqqrsilcch\",\"earlyStoppingDelay\":\"xxkan\",\"earlyStoppingPatience\":\"vri\",\"enableOnnxNormalization\":\"gv\",\"evaluationFrequency\":\"jrulfucte\",\"gradientAccumulationStep\":\"thcfj\",\"layersToFreeze\":\"xlyubqjrostv\",\"learningRate\":\"eqmtzzbeqrz\",\"learningRateScheduler\":\"x\",\"modelName\":\"xrd\",\"momentum\":\"bsrwrsnrhpqat\",\"nesterov\":\"kkvyanxk\",\"numberOfEpochs\":\"csemsvuvd\",\"numberOfWorkers\":\"qxetqmmlivrjjx\",\"optimizer\":\"xdchp\",\"randomSeed\":\"xlehzlxpgfquwzp\",\"stepLRGamma\":\"ibelwcerwkw\",\"stepLRStepSize\":\"jxljtxbusq\",\"trainingBatchSize\":\"xxniuisdzhgbd\",\"validationBatchSize\":\"pagsecnad\",\"warmupCosineLRCycles\":\"wqrgxfllmqi\",\"warmupCosineLRWarmupEpochs\":\"ezoell\",\"weightDecay\":\"kiiwvmtu\"}],\"limitSettings\":{\"maxConcurrentTrials\":259319343,\"maxTrials\":1465106108,\"timeout\":\"PT14H16M47S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1028451528,\"evaluationInterval\":1879980006},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"ilrgun\",\"description\":\"nlduwzorxsbm\"},\"validationDataSize\":10.09388413403216,\"logVerbosity\":\"Warning\",\"targetColumnName\":\"mxkqvf\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"dxcltuubwyvpj\",\"description\":\"wcpjqduqgi\"}}") - .toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("mxkqvf", model.targetColumnName()); - Assertions.assertEquals("wcpjqduqgi", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("dxcltuubwyvpj", model.trainingData().uri()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("puxgcbdsvalpnpt", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("xgpazwugxyqv", model.modelSettings().augmentations()); - Assertions.assertEquals(72.82474F, model.modelSettings().beta1()); - Assertions.assertEquals(87.86046F, model.modelSettings().beta2()); - Assertions.assertEquals(953919104, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("z", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("iuhzzgqlmfa", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("udjpxpqht", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1217471622, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(342924982, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(419853623, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1049447036, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(336351434, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(79.0951F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uxsp", model.modelSettings().modelName()); - Assertions.assertEquals(71.59348F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1973063413, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1796310561, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(1409212705, model.modelSettings().randomSeed()); - Assertions.assertEquals(8.159346F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(99529171, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1768553154, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(385248466, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(70.731415F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2134877467, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(72.09128F, model.modelSettings().weightDecay()); - Assertions.assertEquals(667354640, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(57.01898F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(920278919, model.modelSettings().imageSize()); - Assertions.assertEquals(546709544, model.modelSettings().maxSize()); - Assertions.assertEquals(1447146223, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(true, model.modelSettings().multiScale()); - Assertions.assertEquals(58.316856F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sovyxpavidnievw", model.modelSettings().tileGridSize()); - Assertions.assertEquals(21.210634F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(54.720806F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(27.970045F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("otgkwsxnsrqorcg", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("mv", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("bxeetqujxcxxqn", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("qjkedwqurc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("jmrvvxwjongz", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("hqqrsilcch", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("xxkan", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("vri", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("gv", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("jrulfucte", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("thcfj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("xlyubqjrostv", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("eqmtzzbeqrz", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("xrd", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("bsrwrsnrhpqat", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("kkvyanxk", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("csemsvuvd", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qxetqmmlivrjjx", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("xdchp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlehzlxpgfquwzp", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ibelwcerwkw", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jxljtxbusq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xxniuisdzhgbd", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("pagsecnad", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("wqrgxfllmqi", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("ezoell", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kiiwvmtu", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("axdvwzaehp", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("thd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("mvetatlakfq", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("xwgiks", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("vtooxrpo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("phchgjtnhtukfaci", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("bfntumeezbxvq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("nuvwcgasgomtmjzw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qgo", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpwwzt", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("mkkhtgfredml", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("grllcc", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("ovjowazhpabacom", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(259319343, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1465106108, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT14H16M47S"), model.limitSettings().timeout()); - Assertions.assertEquals(1028451528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1879980006, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nlduwzorxsbm", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("ilrgun", model.validationData().uri()); - Assertions.assertEquals(10.09388413403216D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetection model = - new ImageObjectDetection() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("mxkqvf") - .withTrainingData( - new MLTableJobInput() - .withDescription("wcpjqduqgi") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("dxcltuubwyvpj")) - .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("puxgcbdsvalpnpt") - .withAmsGradient(true) - .withAugmentations("xgpazwugxyqv") - .withBeta1(72.82474F) - .withBeta2(87.86046F) - .withCheckpointFrequency(953919104) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("z") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("iuhzzgqlmfa")) - .withCheckpointRunId("udjpxpqht") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(1217471622) - .withEarlyStoppingPatience(342924982) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(419853623) - .withGradientAccumulationStep(1049447036) - .withLayersToFreeze(336351434) - .withLearningRate(79.0951F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("uxsp") - .withMomentum(71.59348F) - .withNesterov(false) - .withNumberOfEpochs(1973063413) - .withNumberOfWorkers(1796310561) - .withOptimizer(StochasticOptimizer.ADAMW) - .withRandomSeed(1409212705) - .withStepLRGamma(8.159346F) - .withStepLRStepSize(99529171) - .withTrainingBatchSize(1768553154) - .withValidationBatchSize(385248466) - .withWarmupCosineLRCycles(70.731415F) - .withWarmupCosineLRWarmupEpochs(2134877467) - .withWeightDecay(72.09128F) - .withBoxDetectionsPerImage(667354640) - .withBoxScoreThreshold(57.01898F) - .withImageSize(920278919) - .withMaxSize(546709544) - .withMinSize(1447146223) - .withModelSize(ModelSize.LARGE) - .withMultiScale(true) - .withNmsIouThreshold(58.316856F) - .withTileGridSize("sovyxpavidnievw") - .withTileOverlapRatio(21.210634F) - .withTilePredictionsNmsThreshold(54.720806F) - .withValidationIouThreshold(27.970045F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("otgkwsxnsrqorcg") - .withAugmentations("mv") - .withBeta1("bxeetqujxcxxqn") - .withBeta2("qjkedwqurc") - .withDistributed("jmrvvxwjongz") - .withEarlyStopping("hqqrsilcch") - .withEarlyStoppingDelay("xxkan") - .withEarlyStoppingPatience("vri") - .withEnableOnnxNormalization("gv") - .withEvaluationFrequency("jrulfucte") - .withGradientAccumulationStep("thcfj") - .withLayersToFreeze("xlyubqjrostv") - .withLearningRate("eqmtzzbeqrz") - .withLearningRateScheduler("x") - .withModelName("xrd") - .withMomentum("bsrwrsnrhpqat") - .withNesterov("kkvyanxk") - .withNumberOfEpochs("csemsvuvd") - .withNumberOfWorkers("qxetqmmlivrjjx") - .withOptimizer("xdchp") - .withRandomSeed("xlehzlxpgfquwzp") - .withStepLRGamma("ibelwcerwkw") - .withStepLRStepSize("jxljtxbusq") - .withTrainingBatchSize("xxniuisdzhgbd") - .withValidationBatchSize("pagsecnad") - .withWarmupCosineLRCycles("wqrgxfllmqi") - .withWarmupCosineLRWarmupEpochs("ezoell") - .withWeightDecay("kiiwvmtu") - .withBoxDetectionsPerImage("axdvwzaehp") - .withBoxScoreThreshold("thd") - .withImageSize("mvetatlakfq") - .withMaxSize("xwgiks") - .withMinSize("vtooxrpo") - .withModelSize("phchgjtnhtukfaci") - .withMultiScale("bfntumeezbxvq") - .withNmsIouThreshold("nuvwcgasgomtmjzw") - .withTileGridSize("qgo") - .withTileOverlapRatio("xpwwzt") - .withTilePredictionsNmsThreshold("mkkhtgfredml") - .withValidationIouThreshold("grllcc") - .withValidationMetricType("ovjowazhpabacom"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(259319343) - .withMaxTrials(1465106108) - .withTimeout(Duration.parse("PT14H16M47S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1028451528) - .withEvaluationInterval(1879980006)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput() - .withDescription("nlduwzorxsbm") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("ilrgun")) - .withValidationDataSize(10.09388413403216D); - model = BinaryData.fromObject(model).toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("mxkqvf", model.targetColumnName()); - Assertions.assertEquals("wcpjqduqgi", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("dxcltuubwyvpj", model.trainingData().uri()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("puxgcbdsvalpnpt", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("xgpazwugxyqv", model.modelSettings().augmentations()); - Assertions.assertEquals(72.82474F, model.modelSettings().beta1()); - Assertions.assertEquals(87.86046F, model.modelSettings().beta2()); - Assertions.assertEquals(953919104, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("z", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("iuhzzgqlmfa", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("udjpxpqht", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1217471622, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(342924982, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(419853623, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1049447036, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(336351434, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(79.0951F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uxsp", model.modelSettings().modelName()); - Assertions.assertEquals(71.59348F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1973063413, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1796310561, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(1409212705, model.modelSettings().randomSeed()); - Assertions.assertEquals(8.159346F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(99529171, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1768553154, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(385248466, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(70.731415F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2134877467, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(72.09128F, model.modelSettings().weightDecay()); - Assertions.assertEquals(667354640, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(57.01898F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(920278919, model.modelSettings().imageSize()); - Assertions.assertEquals(546709544, model.modelSettings().maxSize()); - Assertions.assertEquals(1447146223, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(true, model.modelSettings().multiScale()); - Assertions.assertEquals(58.316856F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sovyxpavidnievw", model.modelSettings().tileGridSize()); - Assertions.assertEquals(21.210634F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(54.720806F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(27.970045F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("otgkwsxnsrqorcg", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("mv", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("bxeetqujxcxxqn", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("qjkedwqurc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("jmrvvxwjongz", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("hqqrsilcch", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("xxkan", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("vri", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("gv", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("jrulfucte", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("thcfj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("xlyubqjrostv", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("eqmtzzbeqrz", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("xrd", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("bsrwrsnrhpqat", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("kkvyanxk", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("csemsvuvd", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qxetqmmlivrjjx", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("xdchp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlehzlxpgfquwzp", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ibelwcerwkw", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jxljtxbusq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xxniuisdzhgbd", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("pagsecnad", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("wqrgxfllmqi", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("ezoell", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kiiwvmtu", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("axdvwzaehp", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("thd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("mvetatlakfq", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("xwgiks", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("vtooxrpo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("phchgjtnhtukfaci", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("bfntumeezbxvq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("nuvwcgasgomtmjzw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qgo", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpwwzt", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("mkkhtgfredml", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("grllcc", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("ovjowazhpabacom", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(259319343, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1465106108, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT14H16M47S"), model.limitSettings().timeout()); - Assertions.assertEquals(1028451528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1879980006, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nlduwzorxsbm", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("ilrgun", model.validationData().uri()); - Assertions.assertEquals(10.09388413403216D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java deleted file mode 100644 index 1fa3bcb215770..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import org.junit.jupiter.api.Assertions; - -public final class ImageSweepSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageSweepSettings model = - BinaryData - .fromString( - "{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":790899458,\"evaluationInterval\":2024803970},\"samplingAlgorithm\":\"Grid\"}") - .toObject(ImageSweepSettings.class); - Assertions.assertEquals(790899458, model.earlyTermination().delayEvaluation()); - Assertions.assertEquals(2024803970, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageSweepSettings model = - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy().withDelayEvaluation(790899458).withEvaluationInterval(2024803970)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID); - model = BinaryData.fromObject(model).toObject(ImageSweepSettings.class); - Assertions.assertEquals(790899458, model.earlyTermination().delayEvaluation()); - Assertions.assertEquals(2024803970, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java deleted file mode 100644 index 1cfdd03fee4e0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java +++ /dev/null @@ -1,72 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.ImageVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVertical model = - BinaryData - .fromString( - "{\"limitSettings\":{\"maxConcurrentTrials\":4557833,\"maxTrials\":267543853,\"timeout\":\"PT33H18M38S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1370366721,\"evaluationInterval\":1583622668},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"lbcnndt\",\"description\":\"xawqy\"},\"validationDataSize\":69.16610610373561}") - .toObject(ImageVertical.class); - Assertions.assertEquals(4557833, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(267543853, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT33H18M38S"), model.limitSettings().timeout()); - Assertions.assertEquals(1370366721, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1583622668, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("xawqy", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lbcnndt", model.validationData().uri()); - Assertions.assertEquals(69.16610610373561D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVertical model = - new ImageVertical() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(4557833) - .withMaxTrials(267543853) - .withTimeout(Duration.parse("PT33H18M38S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1370366721) - .withEvaluationInterval(1583622668)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID)) - .withValidationData( - new MLTableJobInput() - .withDescription("xawqy") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("lbcnndt")) - .withValidationDataSize(69.16610610373561D); - model = BinaryData.fromObject(model).toObject(ImageVertical.class); - Assertions.assertEquals(4557833, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(267543853, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT33H18M38S"), model.limitSettings().timeout()); - Assertions.assertEquals(1370366721, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1583622668, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("xawqy", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lbcnndt", model.validationData().uri()); - Assertions.assertEquals(69.16610610373561D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java deleted file mode 100644 index bab5e5cf902d5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class InferenceContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InferenceContainerProperties model = - BinaryData - .fromString( - "{\"livenessRoute\":{\"path\":\"xgqddrih\",\"port\":1351999302},\"readinessRoute\":{\"path\":\"oqcaaewdaomdj\",\"port\":68062218},\"scoringRoute\":{\"path\":\"jxxkzbrmsgei\",\"port\":1985792970}}") - .toObject(InferenceContainerProperties.class); - Assertions.assertEquals("xgqddrih", model.livenessRoute().path()); - Assertions.assertEquals(1351999302, model.livenessRoute().port()); - Assertions.assertEquals("oqcaaewdaomdj", model.readinessRoute().path()); - Assertions.assertEquals(68062218, model.readinessRoute().port()); - Assertions.assertEquals("jxxkzbrmsgei", model.scoringRoute().path()); - Assertions.assertEquals(1985792970, model.scoringRoute().port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InferenceContainerProperties model = - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("xgqddrih").withPort(1351999302)) - .withReadinessRoute(new Route().withPath("oqcaaewdaomdj").withPort(68062218)) - .withScoringRoute(new Route().withPath("jxxkzbrmsgei").withPort(1985792970)); - model = BinaryData.fromObject(model).toObject(InferenceContainerProperties.class); - Assertions.assertEquals("xgqddrih", model.livenessRoute().path()); - Assertions.assertEquals(1351999302, model.livenessRoute().port()); - Assertions.assertEquals("oqcaaewdaomdj", model.readinessRoute().path()); - Assertions.assertEquals(68062218, model.readinessRoute().port()); - Assertions.assertEquals("jxxkzbrmsgei", model.scoringRoute().path()); - Assertions.assertEquals(1985792970, model.scoringRoute().port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java deleted file mode 100644 index c367b4075c1e8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java +++ /dev/null @@ -1,47 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchemaResources model = - BinaryData - .fromString( - "{\"requests\":{\"wnwvroevytlyokr\":\"bannovvoxczytp\",\"o\":\"rouuxvnsasbcry\",\"xnazpmkml\":\"izrxklob\"},\"limits\":{\"zxlioh\":\"vfxzopjh\",\"dtfgxqbawpcbb\":\"d\",\"ofyuicd\":\"zqcyknap\",\"ybww\":\"zb\"}}") - .toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("bannovvoxczytp", model.requests().get("wnwvroevytlyokr")); - Assertions.assertEquals("vfxzopjh", model.limits().get("zxlioh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchemaResources model = - new InstanceTypeSchemaResources() - .withRequests( - mapOf("wnwvroevytlyokr", "bannovvoxczytp", "o", "rouuxvnsasbcry", "xnazpmkml", "izrxklob")) - .withLimits(mapOf("zxlioh", "vfxzopjh", "dtfgxqbawpcbb", "d", "ofyuicd", "zqcyknap", "ybww", "zb")); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("bannovvoxczytp", model.requests().get("wnwvroevytlyokr")); - Assertions.assertEquals("vfxzopjh", model.limits().get("zxlioh")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java deleted file mode 100644 index efe4a50a76957..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchema model = - BinaryData - .fromString( - "{\"nodeSelector\":{\"bo\":\"v\"},\"resources\":{\"requests\":{\"q\":\"xypokkhmi\",\"ngnbdxxew\":\"ymc\",\"qecrqctmxx\":\"ninvudbchaqdt\"},\"limits\":{\"vtzn\":\"dmflhuytx\"}}}") - .toObject(InstanceTypeSchema.class); - Assertions.assertEquals("v", model.nodeSelector().get("bo")); - Assertions.assertEquals("xypokkhmi", model.resources().requests().get("q")); - Assertions.assertEquals("dmflhuytx", model.resources().limits().get("vtzn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchema model = - new InstanceTypeSchema() - .withNodeSelector(mapOf("bo", "v")) - .withResources( - new InstanceTypeSchemaResources() - .withRequests(mapOf("q", "xypokkhmi", "ngnbdxxew", "ymc", "qecrqctmxx", "ninvudbchaqdt")) - .withLimits(mapOf("vtzn", "dmflhuytx"))); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchema.class); - Assertions.assertEquals("v", model.nodeSelector().get("bo")); - Assertions.assertEquals("xypokkhmi", model.resources().requests().get("q")); - Assertions.assertEquals("dmflhuytx", model.resources().limits().get("vtzn")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java deleted file mode 100644 index 868c0bd7be76c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"fvjlboxqvkjlmx\",\"computeId\":\"mdy\",\"displayName\":\"dwdigumb\",\"experimentName\":\"aauzzptjazysd\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"services\":{\"y\":{\"endpoint\":\"aiqyuvvfo\",\"errorMessage\":\"p\",\"jobServiceType\":\"qyikvy\",\"port\":1053518025,\"properties\":{},\"status\":\"vluwmncsttij\"}},\"status\":\"NotResponding\",\"description\":\"ekrsgs\",\"properties\":{\"dgkynscliqhzvhxn\":\"huzqgn\",\"tppn\":\"omtkub\",\"frbbc\":\"dxzxhi\"},\"tags\":{\"ykvgtrdcnifmz\":\"agtltdhlfkqoj\"}},\"id\":\"dymbrny\",\"name\":\"u\",\"type\":\"m\"}") - .toObject(JobBaseInner.class); - Assertions.assertEquals("ekrsgs", model.properties().description()); - Assertions.assertEquals("huzqgn", model.properties().properties().get("dgkynscliqhzvhxn")); - Assertions.assertEquals("agtltdhlfkqoj", model.properties().tags().get("ykvgtrdcnifmz")); - Assertions.assertEquals("fvjlboxqvkjlmx", model.properties().componentId()); - Assertions.assertEquals("mdy", model.properties().computeId()); - Assertions.assertEquals("dwdigumb", model.properties().displayName()); - Assertions.assertEquals("aauzzptjazysd", model.properties().experimentName()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("aiqyuvvfo", model.properties().services().get("y").endpoint()); - Assertions.assertEquals("qyikvy", model.properties().services().get("y").jobServiceType()); - Assertions.assertEquals(1053518025, model.properties().services().get("y").port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseInner model = - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("ekrsgs") - .withProperties(mapOf("dgkynscliqhzvhxn", "huzqgn", "tppn", "omtkub", "frbbc", "dxzxhi")) - .withTags(mapOf("ykvgtrdcnifmz", "agtltdhlfkqoj")) - .withComponentId("fvjlboxqvkjlmx") - .withComputeId("mdy") - .withDisplayName("dwdigumb") - .withExperimentName("aauzzptjazysd") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(false) - .withServices( - mapOf( - "y", - new JobService() - .withEndpoint("aiqyuvvfo") - .withJobServiceType("qyikvy") - .withPort(1053518025) - .withProperties(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobBaseInner.class); - Assertions.assertEquals("ekrsgs", model.properties().description()); - Assertions.assertEquals("huzqgn", model.properties().properties().get("dgkynscliqhzvhxn")); - Assertions.assertEquals("agtltdhlfkqoj", model.properties().tags().get("ykvgtrdcnifmz")); - Assertions.assertEquals("fvjlboxqvkjlmx", model.properties().componentId()); - Assertions.assertEquals("mdy", model.properties().computeId()); - Assertions.assertEquals("dwdigumb", model.properties().displayName()); - Assertions.assertEquals("aauzzptjazysd", model.properties().experimentName()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("aiqyuvvfo", model.properties().services().get("y").endpoint()); - Assertions.assertEquals("qyikvy", model.properties().services().get("y").jobServiceType()); - Assertions.assertEquals(1053518025, model.properties().services().get("y").port()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java deleted file mode 100644 index 44ccda7459915..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseProperties model = - BinaryData - .fromString( - "{\"jobType\":\"JobBaseProperties\",\"componentId\":\"a\",\"computeId\":\"g\",\"displayName\":\"hocxvdfffwafqrou\",\"experimentName\":\"spave\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"xdbeesmieknl\":{\"endpoint\":\"n\",\"errorMessage\":\"zudhcxg\",\"jobServiceType\":\"oyxcdyuib\",\"port\":595382657,\"properties\":{\"aeoisrvh\":\"bzydvfvfcj\",\"ukiscvwmzhw\":\"gorf\",\"nzeyqxtjj\":\"lefaxvxilcbtgn\"},\"status\":\"qlqhycavodg\"},\"cjhfgmvecactxmw\":{\"endpoint\":\"riaa\",\"errorMessage\":\"uagydwqfbylyrf\",\"jobServiceType\":\"agt\",\"port\":1621141865,\"properties\":{\"zldmozuxy\":\"qwogfnzjvus\",\"ysownbtgkbug\":\"fsbtkad\",\"pe\":\"jqctojcmisofie\",\"hihihlhzdsqtzbsr\":\"ojyqdhcuplcplcw\"},\"status\":\"o\"},\"etoge\":{\"endpoint\":\"e\",\"errorMessage\":\"wcluqovekqvgq\",\"jobServiceType\":\"wifzmp\",\"port\":1626415565,\"properties\":{\"rfsphuagrt\":\"qikfxcv\",\"xubyjaffmmfblcqc\":\"ikteusqczkvyk\",\"brta\":\"ubgq\",\"lqxihhrmooiz\":\"metttwgd\"},\"status\":\"eypxiutcxapzhyr\"}},\"status\":\"Preparing\",\"description\":\"slhvnhlab\",\"properties\":{\"hvv\":\"kkzjcjbtrga\"},\"tags\":{\"oqbeitpkxzt\":\"xjjs\",\"pimaqxzhemjyh\":\"oobklftidgfcwq\",\"bawpfajnjwltlwt\":\"hujswtwkozzwcul\",\"uktalhsnvkcdmxz\":\"j\"}}") - .toObject(JobBaseProperties.class); - Assertions.assertEquals("slhvnhlab", model.description()); - Assertions.assertEquals("kkzjcjbtrga", model.properties().get("hvv")); - Assertions.assertEquals("xjjs", model.tags().get("oqbeitpkxzt")); - Assertions.assertEquals("a", model.componentId()); - Assertions.assertEquals("g", model.computeId()); - Assertions.assertEquals("hocxvdfffwafqrou", model.displayName()); - Assertions.assertEquals("spave", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("n", model.services().get("xdbeesmieknl").endpoint()); - Assertions.assertEquals("oyxcdyuib", model.services().get("xdbeesmieknl").jobServiceType()); - Assertions.assertEquals(595382657, model.services().get("xdbeesmieknl").port()); - Assertions.assertEquals("bzydvfvfcj", model.services().get("xdbeesmieknl").properties().get("aeoisrvh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseProperties model = - new JobBaseProperties() - .withDescription("slhvnhlab") - .withProperties(mapOf("hvv", "kkzjcjbtrga")) - .withTags( - mapOf( - "oqbeitpkxzt", - "xjjs", - "pimaqxzhemjyh", - "oobklftidgfcwq", - "bawpfajnjwltlwt", - "hujswtwkozzwcul", - "uktalhsnvkcdmxz", - "j")) - .withComponentId("a") - .withComputeId("g") - .withDisplayName("hocxvdfffwafqrou") - .withExperimentName("spave") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "xdbeesmieknl", - new JobService() - .withEndpoint("n") - .withJobServiceType("oyxcdyuib") - .withPort(595382657) - .withProperties( - mapOf("aeoisrvh", "bzydvfvfcj", "ukiscvwmzhw", "gorf", "nzeyqxtjj", "lefaxvxilcbtgn")), - "cjhfgmvecactxmw", - new JobService() - .withEndpoint("riaa") - .withJobServiceType("agt") - .withPort(1621141865) - .withProperties( - mapOf( - "zldmozuxy", - "qwogfnzjvus", - "ysownbtgkbug", - "fsbtkad", - "pe", - "jqctojcmisofie", - "hihihlhzdsqtzbsr", - "ojyqdhcuplcplcw")), - "etoge", - new JobService() - .withEndpoint("e") - .withJobServiceType("wifzmp") - .withPort(1626415565) - .withProperties( - mapOf( - "rfsphuagrt", - "qikfxcv", - "xubyjaffmmfblcqc", - "ikteusqczkvyk", - "brta", - "ubgq", - "lqxihhrmooiz", - "metttwgd")))); - model = BinaryData.fromObject(model).toObject(JobBaseProperties.class); - Assertions.assertEquals("slhvnhlab", model.description()); - Assertions.assertEquals("kkzjcjbtrga", model.properties().get("hvv")); - Assertions.assertEquals("xjjs", model.tags().get("oqbeitpkxzt")); - Assertions.assertEquals("a", model.componentId()); - Assertions.assertEquals("g", model.computeId()); - Assertions.assertEquals("hocxvdfffwafqrou", model.displayName()); - Assertions.assertEquals("spave", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("n", model.services().get("xdbeesmieknl").endpoint()); - Assertions.assertEquals("oyxcdyuib", model.services().get("xdbeesmieknl").jobServiceType()); - Assertions.assertEquals(595382657, model.services().get("xdbeesmieknl").port()); - Assertions.assertEquals("bzydvfvfcj", model.services().get("xdbeesmieknl").properties().get("aeoisrvh")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index dfdc7ec3e5e6c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,97 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"zoggculapz\",\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"gogtqxepnylbf\",\"computeId\":\"jlyjtlvofq\",\"displayName\":\"vfcibyfmowux\",\"experimentName\":\"jpvd\",\"isArchived\":true,\"services\":{},\"status\":\"Queued\",\"description\":\"wzjbh\",\"properties\":{},\"tags\":{}},\"id\":\"jrkambtrnegvmnv\",\"name\":\"q\",\"type\":\"qvldspastjbkkd\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"lves\",\"computeId\":\"jlxr\",\"displayName\":\"lozapeewchpxlk\",\"experimentName\":\"kuziycsle\",\"isArchived\":true,\"services\":{},\"status\":\"Preparing\",\"description\":\"tyh\",\"properties\":{},\"tags\":{}},\"id\":\"dcgzul\",\"name\":\"mmrqz\",\"type\":\"rr\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"pglydz\",\"computeId\":\"rvqeevtoepryutn\",\"displayName\":\"tpzdmovzvfvaawzq\",\"experimentName\":\"f\",\"isArchived\":false,\"services\":{},\"status\":\"Provisioning\",\"description\":\"aecxndtic\",\"properties\":{},\"tags\":{}},\"id\":\"zmlqtmldgxo\",\"name\":\"firclnpkciayz\",\"type\":\"iykhy\"}]}") - .toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("zoggculapz", model.nextLink()); - Assertions.assertEquals("wzjbh", model.value().get(0).properties().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).properties().componentId()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).properties().computeId()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).properties().displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).properties().experimentName()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseResourceArmPaginatedResult model = - new JobBaseResourceArmPaginatedResult() - .withNextLink("zoggculapz") - .withValue( - Arrays - .asList( - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("wzjbh") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("gogtqxepnylbf") - .withComputeId("jlyjtlvofq") - .withDisplayName("vfcibyfmowux") - .withExperimentName("jpvd") - .withIsArchived(true) - .withServices(mapOf())), - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("tyh") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("lves") - .withComputeId("jlxr") - .withDisplayName("lozapeewchpxlk") - .withExperimentName("kuziycsle") - .withIsArchived(true) - .withServices(mapOf())), - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("aecxndtic") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("pglydz") - .withComputeId("rvqeevtoepryutn") - .withDisplayName("tpzdmovzvfvaawzq") - .withExperimentName("f") - .withIsArchived(false) - .withServices(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("zoggculapz", model.nextLink()); - Assertions.assertEquals("wzjbh", model.value().get(0).properties().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).properties().componentId()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).properties().computeId()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).properties().displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).properties().experimentName()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java deleted file mode 100644 index c2332d6a9fe18..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import org.junit.jupiter.api.Assertions; - -public final class JobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobInput model = - BinaryData.fromString("{\"jobInputType\":\"JobInput\",\"description\":\"pjby\"}").toObject(JobInput.class); - Assertions.assertEquals("pjby", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobInput model = new JobInput().withDescription("pjby"); - model = BinaryData.fromObject(model).toObject(JobInput.class); - Assertions.assertEquals("pjby", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java deleted file mode 100644 index b656997bc9fa2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class JobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobLimits model = - BinaryData - .fromString("{\"jobLimitsType\":\"JobLimits\",\"timeout\":\"PT90H18M40S\"}") - .toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H18M40S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobLimits model = new JobLimits().withTimeout(Duration.parse("PT90H18M40S")); - model = BinaryData.fromObject(model).toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H18M40S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java deleted file mode 100644 index 26db9eb1fe842..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import org.junit.jupiter.api.Assertions; - -public final class JobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobOutput model = - BinaryData - .fromString("{\"jobOutputType\":\"JobOutput\",\"description\":\"qmbzmq\"}") - .toObject(JobOutput.class); - Assertions.assertEquals("qmbzmq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobOutput model = new JobOutput().withDescription("qmbzmq"); - model = BinaryData.fromObject(model).toObject(JobOutput.class); - Assertions.assertEquals("qmbzmq", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java deleted file mode 100644 index 016031d683192..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobResourceConfiguration model = - BinaryData - .fromString( - "{\"dockerArgs\":\"atbnxwbj\",\"shmSize\":\"dbirkfpksokdgo\",\"instanceCount\":1548314621,\"instanceType\":\"jymrhbg\",\"properties\":{\"nfnzhhh\":\"datazkye\",\"mffjkutycyarn\":\"datao\",\"pyc\":\"dataoohguabzoghkt\"}}") - .toObject(JobResourceConfiguration.class); - Assertions.assertEquals(1548314621, model.instanceCount()); - Assertions.assertEquals("jymrhbg", model.instanceType()); - Assertions.assertEquals("atbnxwbj", model.dockerArgs()); - Assertions.assertEquals("dbirkfpksokdgo", model.shmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceConfiguration model = - new JobResourceConfiguration() - .withInstanceCount(1548314621) - .withInstanceType("jymrhbg") - .withProperties(mapOf("nfnzhhh", "datazkye", "mffjkutycyarn", "datao", "pyc", "dataoohguabzoghkt")) - .withDockerArgs("atbnxwbj") - .withShmSize("dbirkfpksokdgo"); - model = BinaryData.fromObject(model).toObject(JobResourceConfiguration.class); - Assertions.assertEquals(1548314621, model.instanceCount()); - Assertions.assertEquals("jymrhbg", model.instanceType()); - Assertions.assertEquals("atbnxwbj", model.dockerArgs()); - Assertions.assertEquals("dbirkfpksokdgo", model.shmSize()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java deleted file mode 100644 index 169695892b2ce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java +++ /dev/null @@ -1,96 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobScheduleAction; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobScheduleAction model = - BinaryData - .fromString( - "{\"actionType\":\"CreateJob\",\"jobDefinition\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"xkydfbwlja\",\"computeId\":\"uerkjddvrg\",\"displayName\":\"egftcvb\",\"experimentName\":\"ftksd\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"jgmn\":{\"endpoint\":\"gmwdh\",\"errorMessage\":\"buvczldbglzoutb\",\"jobServiceType\":\"qgz\",\"port\":1543957529,\"properties\":{},\"status\":\"lyzgsnor\"},\"rswhbuubpyro\":{\"endpoint\":\"otvmrxk\",\"errorMessage\":\"obvvjbhvh\",\"jobServiceType\":\"qayfl\",\"port\":307514340,\"properties\":{},\"status\":\"snuudtelvhyibdr\"},\"km\":{\"endpoint\":\"joxztfwfqchvczev\",\"errorMessage\":\"nctagfyvrtpqpem\",\"jobServiceType\":\"cgkrepdqhqy\",\"port\":1873371469,\"properties\":{},\"status\":\"mvxqab\"}},\"status\":\"NotStarted\",\"description\":\"inhgre\",\"properties\":{\"angp\":\"whlpuzjpceezn\",\"phmsexroq\":\"bfaxyxzlbc\",\"nfee\":\"ndktxfv\"},\"tags\":{\"bgnixxoww\":\"krie\",\"p\":\"kyfwnwpiwxeiicr\",\"dm\":\"pk\"}}}") - .toObject(JobScheduleAction.class); - Assertions.assertEquals("inhgre", model.jobDefinition().description()); - Assertions.assertEquals("whlpuzjpceezn", model.jobDefinition().properties().get("angp")); - Assertions.assertEquals("krie", model.jobDefinition().tags().get("bgnixxoww")); - Assertions.assertEquals("xkydfbwlja", model.jobDefinition().componentId()); - Assertions.assertEquals("uerkjddvrg", model.jobDefinition().computeId()); - Assertions.assertEquals("egftcvb", model.jobDefinition().displayName()); - Assertions.assertEquals("ftksd", model.jobDefinition().experimentName()); - Assertions.assertEquals(true, model.jobDefinition().isArchived()); - Assertions.assertEquals("gmwdh", model.jobDefinition().services().get("jgmn").endpoint()); - Assertions.assertEquals("qgz", model.jobDefinition().services().get("jgmn").jobServiceType()); - Assertions.assertEquals(1543957529, model.jobDefinition().services().get("jgmn").port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobScheduleAction model = - new JobScheduleAction() - .withJobDefinition( - new JobBaseProperties() - .withDescription("inhgre") - .withProperties(mapOf("angp", "whlpuzjpceezn", "phmsexroq", "bfaxyxzlbc", "nfee", "ndktxfv")) - .withTags(mapOf("bgnixxoww", "krie", "p", "kyfwnwpiwxeiicr", "dm", "pk")) - .withComponentId("xkydfbwlja") - .withComputeId("uerkjddvrg") - .withDisplayName("egftcvb") - .withExperimentName("ftksd") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "jgmn", - new JobService() - .withEndpoint("gmwdh") - .withJobServiceType("qgz") - .withPort(1543957529) - .withProperties(mapOf()), - "rswhbuubpyro", - new JobService() - .withEndpoint("otvmrxk") - .withJobServiceType("qayfl") - .withPort(307514340) - .withProperties(mapOf()), - "km", - new JobService() - .withEndpoint("joxztfwfqchvczev") - .withJobServiceType("cgkrepdqhqy") - .withPort(1873371469) - .withProperties(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobScheduleAction.class); - Assertions.assertEquals("inhgre", model.jobDefinition().description()); - Assertions.assertEquals("whlpuzjpceezn", model.jobDefinition().properties().get("angp")); - Assertions.assertEquals("krie", model.jobDefinition().tags().get("bgnixxoww")); - Assertions.assertEquals("xkydfbwlja", model.jobDefinition().componentId()); - Assertions.assertEquals("uerkjddvrg", model.jobDefinition().computeId()); - Assertions.assertEquals("egftcvb", model.jobDefinition().displayName()); - Assertions.assertEquals("ftksd", model.jobDefinition().experimentName()); - Assertions.assertEquals(true, model.jobDefinition().isArchived()); - Assertions.assertEquals("gmwdh", model.jobDefinition().services().get("jgmn").endpoint()); - Assertions.assertEquals("qgz", model.jobDefinition().services().get("jgmn").jobServiceType()); - Assertions.assertEquals(1543957529, model.jobDefinition().services().get("jgmn").port()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java deleted file mode 100644 index f6f30fc8c6188..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobService model = - BinaryData - .fromString( - "{\"endpoint\":\"oaimlnw\",\"errorMessage\":\"aomylwea\",\"jobServiceType\":\"lcsethwwnpj\",\"port\":307378678,\"properties\":{\"ousnfepgfewe\":\"wpchwahf\",\"hdjhlimmbcx\":\"wlyxgncxyk\",\"cporxvxcjz\":\"h\",\"juhdqazkmtgguwpi\":\"qizxfpxtgqscjavf\"},\"status\":\"ajc\"}") - .toObject(JobService.class); - Assertions.assertEquals("oaimlnw", model.endpoint()); - Assertions.assertEquals("lcsethwwnpj", model.jobServiceType()); - Assertions.assertEquals(307378678, model.port()); - Assertions.assertEquals("wpchwahf", model.properties().get("ousnfepgfewe")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobService model = - new JobService() - .withEndpoint("oaimlnw") - .withJobServiceType("lcsethwwnpj") - .withPort(307378678) - .withProperties( - mapOf( - "ousnfepgfewe", - "wpchwahf", - "hdjhlimmbcx", - "wlyxgncxyk", - "cporxvxcjz", - "h", - "juhdqazkmtgguwpi", - "qizxfpxtgqscjavf")); - model = BinaryData.fromObject(model).toObject(JobService.class); - Assertions.assertEquals("oaimlnw", model.endpoint()); - Assertions.assertEquals("lcsethwwnpj", model.jobServiceType()); - Assertions.assertEquals(307378678, model.port()); - Assertions.assertEquals("wpchwahf", model.properties().get("ousnfepgfewe")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java deleted file mode 100644 index 23838cb4b5c83..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 JobsCancelMockTests { - @Test - public void testCancel() 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().cancel("bdxmd", "esbrujbjpppktl", "dibfmthi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index cf71fac576b0a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,105 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -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 JobsCreateOrUpdateWithResponseMockTests { - @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\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"qmrpahuuonjk\",\"computeId\":\"ukguehvvp\",\"displayName\":\"oegcjoj\",\"experimentName\":\"eui\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Preparing\",\"description\":\"nhtmeplhbp\",\"properties\":{\"uc\":\"pmummmkva\",\"chxwwuzdmh\":\"jiuaiqpmnufzh\"},\"tags\":{\"mlitqdsj\":\"vivjm\",\"efndslvrqoemwsi\":\"pdviscotyxbrii\"}},\"id\":\"ailwdqmqfyd\",\"name\":\"otmfxlkdlgwgna\",\"type\":\"kuuyiuyuaf\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = - manager - .jobs() - .define("zqpl") - .withExistingWorkspace("at", "ejrnmi") - .withProperties( - new JobBaseProperties() - .withDescription("xxkwykuqdndx") - .withProperties(mapOf("gga", "h")) - .withTags(mapOf("eerscdxrnrnjrcu", "gtf", "acnrgfdtncmspsan", "mb", "b", "ame")) - .withComponentId("kihonik") - .withComputeId("r") - .withDisplayName("ffjilzfbpnt") - .withExperimentName("kensckh") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(false) - .withServices(mapOf())) - .create(); - - Assertions.assertEquals("nhtmeplhbp", response.properties().description()); - Assertions.assertEquals("pmummmkva", response.properties().properties().get("uc")); - Assertions.assertEquals("vivjm", response.properties().tags().get("mlitqdsj")); - Assertions.assertEquals("qmrpahuuonjk", response.properties().componentId()); - Assertions.assertEquals("ukguehvvp", response.properties().computeId()); - Assertions.assertEquals("oegcjoj", response.properties().displayName()); - Assertions.assertEquals("eui", response.properties().experimentName()); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java deleted file mode 100644 index 58d8aeb6fb18c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 JobsDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("fvbennmfkbpjnr", "ekwwnthropmdudsy", "urz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java deleted file mode 100644 index 99d19faeb69b7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.JobBase; -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 JobsGetWithResponseMockTests { - @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\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"yedzfzq\",\"computeId\":\"uqhtdereuno\",\"displayName\":\"kzwhpj\",\"experimentName\":\"yxedznmx\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Queued\",\"description\":\"my\",\"properties\":{\"jjtpdyzoutxfptof\":\"px\",\"gaaqw\":\"gnuywezygva\",\"lufbortb\":\"kgjpytpmpvdnoge\"},\"tags\":{\"axzs\":\"k\"}},\"id\":\"xxyjisskobqoclfl\",\"name\":\"oewyhxessmvrkd\",\"type\":\"sqeq\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = - manager - .jobs() - .getWithResponse("vktjhffecqkoq", "ouergaghp", "zxkpyehhfdyld", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("my", response.properties().description()); - Assertions.assertEquals("px", response.properties().properties().get("jjtpdyzoutxfptof")); - Assertions.assertEquals("k", response.properties().tags().get("axzs")); - Assertions.assertEquals("yedzfzq", response.properties().componentId()); - Assertions.assertEquals("uqhtdereuno", response.properties().computeId()); - Assertions.assertEquals("kzwhpj", response.properties().displayName()); - Assertions.assertEquals("yxedznmx", response.properties().experimentName()); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java deleted file mode 100644 index ae721a98aa718..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -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 JobsListMockTests { - @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\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"tvzjyi\",\"computeId\":\"bqrvvbqv\",\"displayName\":\"mpe\",\"experimentName\":\"xgiqasifubn\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Completed\",\"description\":\"jnxjkht\",\"properties\":{\"xfwkz\":\"vyouweui\",\"kqytkztadopgfzdg\":\"smsfbevyllznf\"},\"tags\":{\"svloyyhigq\":\"yc\"}},\"id\":\"juqwqajq\",\"name\":\"zxpixhyo\",\"type\":\"pnfdbgsosciene\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .jobs() - .list( - "hrbkhtmqowi", - "asfgqgucyhfaimqv", - "ruozkgyfp", - "oehgfmqmskkixvlz", - "xplhpeva", - ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jnxjkht", response.iterator().next().properties().description()); - Assertions.assertEquals("vyouweui", response.iterator().next().properties().properties().get("xfwkz")); - Assertions.assertEquals("yc", response.iterator().next().properties().tags().get("svloyyhigq")); - Assertions.assertEquals("tvzjyi", response.iterator().next().properties().componentId()); - Assertions.assertEquals("bqrvvbqv", response.iterator().next().properties().computeId()); - Assertions.assertEquals("mpe", response.iterator().next().properties().displayName()); - Assertions.assertEquals("xgiqasifubn", response.iterator().next().properties().experimentName()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java deleted file mode 100644 index 8bfd89ba8ca1f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java +++ /dev/null @@ -1,88 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesProperties model = - BinaryData - .fromString( - "{\"relayConnectionString\":\"oyuelyetn\",\"serviceBusConnectionString\":\"bf\",\"extensionPrincipalId\":\"ggagfln\",\"extensionInstanceReleaseTrain\":\"mtrwah\",\"vcName\":\"mu\",\"namespace\":\"tb\",\"defaultInstanceType\":\"plrohkpigq\",\"instanceTypes\":{\"nmg\":{\"nodeSelector\":{\"alhhjnhgwydyynfs\":\"kzmkwklsnoxaxmqe\",\"qtanarfdlpuk\":\"khgb\",\"neizjcpe\":\"py\"},\"resources\":{\"requests\":{},\"limits\":{}}},\"f\":{\"nodeSelector\":{\"fpazjzoywjxhpd\":\"uxddbhfh\",\"tehtuevrhrljyoog\":\"lontacnpq\",\"sd\":\"xh\",\"arenlvhhtklnvnaf\":\"ugwbsreurfqkf\"},\"resources\":{\"requests\":{},\"limits\":{}}}}}") - .toObject(KubernetesProperties.class); - Assertions.assertEquals("oyuelyetn", model.relayConnectionString()); - Assertions.assertEquals("bf", model.serviceBusConnectionString()); - Assertions.assertEquals("ggagfln", model.extensionPrincipalId()); - Assertions.assertEquals("mtrwah", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("mu", model.vcName()); - Assertions.assertEquals("tb", model.namespace()); - Assertions.assertEquals("plrohkpigq", model.defaultInstanceType()); - Assertions - .assertEquals("kzmkwklsnoxaxmqe", model.instanceTypes().get("nmg").nodeSelector().get("alhhjnhgwydyynfs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesProperties model = - new KubernetesProperties() - .withRelayConnectionString("oyuelyetn") - .withServiceBusConnectionString("bf") - .withExtensionPrincipalId("ggagfln") - .withExtensionInstanceReleaseTrain("mtrwah") - .withVcName("mu") - .withNamespace("tb") - .withDefaultInstanceType("plrohkpigq") - .withInstanceTypes( - mapOf( - "nmg", - new InstanceTypeSchema() - .withNodeSelector( - mapOf("alhhjnhgwydyynfs", "kzmkwklsnoxaxmqe", "qtanarfdlpuk", "khgb", "neizjcpe", "py")) - .withResources(new InstanceTypeSchemaResources().withRequests(mapOf()).withLimits(mapOf())), - "f", - new InstanceTypeSchema() - .withNodeSelector( - mapOf( - "fpazjzoywjxhpd", - "uxddbhfh", - "tehtuevrhrljyoog", - "lontacnpq", - "sd", - "xh", - "arenlvhhtklnvnaf", - "ugwbsreurfqkf")) - .withResources( - new InstanceTypeSchemaResources().withRequests(mapOf()).withLimits(mapOf())))); - model = BinaryData.fromObject(model).toObject(KubernetesProperties.class); - Assertions.assertEquals("oyuelyetn", model.relayConnectionString()); - Assertions.assertEquals("bf", model.serviceBusConnectionString()); - Assertions.assertEquals("ggagfln", model.extensionPrincipalId()); - Assertions.assertEquals("mtrwah", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("mu", model.vcName()); - Assertions.assertEquals("tb", model.namespace()); - Assertions.assertEquals("plrohkpigq", model.defaultInstanceType()); - Assertions - .assertEquals("kzmkwklsnoxaxmqe", model.instanceTypes().get("nmg").nodeSelector().get("alhhjnhgwydyynfs")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java deleted file mode 100644 index 453e44acde53b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java +++ /dev/null @@ -1,66 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import com.azure.resourcemanager.machinelearning.models.KubernetesSchema; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesSchema model = - BinaryData - .fromString( - "{\"properties\":{\"relayConnectionString\":\"j\",\"serviceBusConnectionString\":\"nuygbqeqqekewvnq\",\"extensionPrincipalId\":\"dlguaucmfdjwn\",\"extensionInstanceReleaseTrain\":\"xpunjqi\",\"vcName\":\"zvvitacgxmfcs\",\"namespace\":\"rxhtvso\",\"defaultInstanceType\":\"lwntsjgqrs\",\"instanceTypes\":{\"uuybnchrsz\":{\"nodeSelector\":{}}}}}") - .toObject(KubernetesSchema.class); - Assertions.assertEquals("j", model.properties().relayConnectionString()); - Assertions.assertEquals("nuygbqeqqekewvnq", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("dlguaucmfdjwn", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xpunjqi", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("zvvitacgxmfcs", model.properties().vcName()); - Assertions.assertEquals("rxhtvso", model.properties().namespace()); - Assertions.assertEquals("lwntsjgqrs", model.properties().defaultInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesSchema model = - new KubernetesSchema() - .withProperties( - new KubernetesProperties() - .withRelayConnectionString("j") - .withServiceBusConnectionString("nuygbqeqqekewvnq") - .withExtensionPrincipalId("dlguaucmfdjwn") - .withExtensionInstanceReleaseTrain("xpunjqi") - .withVcName("zvvitacgxmfcs") - .withNamespace("rxhtvso") - .withDefaultInstanceType("lwntsjgqrs") - .withInstanceTypes(mapOf("uuybnchrsz", new InstanceTypeSchema().withNodeSelector(mapOf())))); - model = BinaryData.fromObject(model).toObject(KubernetesSchema.class); - Assertions.assertEquals("j", model.properties().relayConnectionString()); - Assertions.assertEquals("nuygbqeqqekewvnq", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("dlguaucmfdjwn", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xpunjqi", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("zvvitacgxmfcs", model.properties().vcName()); - Assertions.assertEquals("rxhtvso", model.properties().namespace()); - Assertions.assertEquals("lwntsjgqrs", model.properties().defaultInstanceType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java deleted file mode 100644 index 57777282d3033..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.Kubernetes; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Kubernetes model = - BinaryData - .fromString( - "{\"computeType\":\"Kubernetes\",\"properties\":{\"relayConnectionString\":\"nfxofvcj\",\"serviceBusConnectionString\":\"dirazf\",\"extensionPrincipalId\":\"ejwabmdujtmvco\",\"extensionInstanceReleaseTrain\":\"xcmjurbu\",\"vcName\":\"lkyqltqsrog\",\"namespace\":\"wkffdjkt\",\"defaultInstanceType\":\"sidfv\",\"instanceTypes\":{\"n\":{\"nodeSelector\":{}}}},\"computeLocation\":\"ijtk\",\"provisioningState\":\"Succeeded\",\"description\":\"ogsf\",\"createdOn\":\"2021-05-31T19:57:24Z\",\"modifiedOn\":\"2021-02-04T08:33:30Z\",\"resourceId\":\"nsharujtjiqxfzyj\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":true}") - .toObject(Kubernetes.class); - Assertions.assertEquals("ijtk", model.computeLocation()); - Assertions.assertEquals("ogsf", model.description()); - Assertions.assertEquals("nsharujtjiqxfzyj", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("nfxofvcj", model.properties().relayConnectionString()); - Assertions.assertEquals("dirazf", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("ejwabmdujtmvco", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xcmjurbu", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("lkyqltqsrog", model.properties().vcName()); - Assertions.assertEquals("wkffdjkt", model.properties().namespace()); - Assertions.assertEquals("sidfv", model.properties().defaultInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Kubernetes model = - new Kubernetes() - .withComputeLocation("ijtk") - .withDescription("ogsf") - .withResourceId("nsharujtjiqxfzyj") - .withDisableLocalAuth(true) - .withProperties( - new KubernetesProperties() - .withRelayConnectionString("nfxofvcj") - .withServiceBusConnectionString("dirazf") - .withExtensionPrincipalId("ejwabmdujtmvco") - .withExtensionInstanceReleaseTrain("xcmjurbu") - .withVcName("lkyqltqsrog") - .withNamespace("wkffdjkt") - .withDefaultInstanceType("sidfv") - .withInstanceTypes(mapOf("n", new InstanceTypeSchema().withNodeSelector(mapOf())))); - model = BinaryData.fromObject(model).toObject(Kubernetes.class); - Assertions.assertEquals("ijtk", model.computeLocation()); - Assertions.assertEquals("ogsf", model.description()); - Assertions.assertEquals("nsharujtjiqxfzyj", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("nfxofvcj", model.properties().relayConnectionString()); - Assertions.assertEquals("dirazf", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("ejwabmdujtmvco", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xcmjurbu", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("lkyqltqsrog", model.properties().vcName()); - Assertions.assertEquals("wkffdjkt", model.properties().namespace()); - Assertions.assertEquals("sidfv", model.properties().defaultInstanceType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java deleted file mode 100644 index ba013607d7ff1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; - -public final class ListAmlUserFeatureResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListAmlUserFeatureResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"cvclxynpdk\",\"displayName\":\"fabuiyjibu\",\"description\":\"hdugneiknpg\"},{\"id\":\"gjiuqhibto\",\"displayName\":\"pqwjedm\",\"description\":\"r\"}],\"nextLink\":\"g\"}") - .toObject(ListAmlUserFeatureResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListAmlUserFeatureResult model = new ListAmlUserFeatureResult(); - model = BinaryData.fromObject(model).toObject(ListAmlUserFeatureResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java deleted file mode 100644 index cac57a0271876..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"rvqdra\",\"amlWorkspaceLocation\":\"jybige\",\"type\":\"qfbow\",\"unit\":\"Count\",\"currentValue\":4187351799054769848,\"limit\":8321881464692032483,\"name\":{\"value\":\"iywgqywgndrvynh\",\"localizedValue\":\"pphrcgynco\"}},{\"id\":\"ecfvmm\",\"amlWorkspaceLocation\":\"ofsx\",\"type\":\"evgbmqjq\",\"unit\":\"Count\",\"currentValue\":596965066352142059,\"limit\":4744542296757351266,\"name\":{\"value\":\"zuvccfwnfnbacfio\",\"localizedValue\":\"ebxetqgtzxdp\"}}],\"nextLink\":\"bqqwxrj\"}") - .toObject(ListUsagesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java deleted file mode 100644 index b8f8b806a1734..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; - -public final class ListWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListWorkspaceQuotas model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"gidyjrrf\",\"amlWorkspaceLocation\":\"aos\",\"type\":\"xc\",\"name\":{\"value\":\"pclhocohslk\",\"localizedValue\":\"leggzfbu\"},\"limit\":5326513191162029025,\"unit\":\"Count\"},{\"id\":\"k\",\"amlWorkspaceLocation\":\"eiithlvmez\",\"type\":\"shxmzsbbzoggigrx\",\"name\":{\"value\":\"rvjx\",\"localizedValue\":\"nspydptkoenkoukn\"},\"limit\":5351704758336650999,\"unit\":\"Count\"},{\"id\":\"kbldngkpocipa\",\"amlWorkspaceLocation\":\"xoegukgjnpiucgy\",\"type\":\"vqzntypmrbpizcdr\",\"name\":{\"value\":\"dpydn\",\"localizedValue\":\"hxdeoejz\"},\"limit\":731748747615090484,\"unit\":\"Count\"}],\"nextLink\":\"ttgzfbis\"}") - .toObject(ListWorkspaceQuotas.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListWorkspaceQuotas model = new ListWorkspaceQuotas(); - model = BinaryData.fromObject(model).toObject(ListWorkspaceQuotas.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java deleted file mode 100644 index f129857a63a06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import org.junit.jupiter.api.Assertions; - -public final class LiteralJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LiteralJobInput model = - BinaryData - .fromString("{\"jobInputType\":\"literal\",\"value\":\"mabeddqilwgdf\",\"description\":\"qfp\"}") - .toObject(LiteralJobInput.class); - Assertions.assertEquals("qfp", model.description()); - Assertions.assertEquals("mabeddqilwgdf", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiteralJobInput model = new LiteralJobInput().withDescription("qfp").withValue("mabeddqilwgdf"); - model = BinaryData.fromObject(model).toObject(LiteralJobInput.class); - Assertions.assertEquals("qfp", model.description()); - Assertions.assertEquals("mabeddqilwgdf", model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java deleted file mode 100644 index 3ea54481c38d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"mlflow_model\",\"mode\":\"Direct\",\"uri\":\"vdmvxadqa\",\"description\":\"rgnawbabgfbk\"}") - .toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("rgnawbabgfbk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("vdmvxadqa", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobInput model = - new MLFlowModelJobInput() - .withDescription("rgnawbabgfbk") - .withMode(InputDeliveryMode.DIRECT) - .withUri("vdmvxadqa"); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("rgnawbabgfbk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("vdmvxadqa", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java deleted file mode 100644 index f145c68c42973..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"mlflow_model\",\"mode\":\"Upload\",\"uri\":\"twmlmhjnqtqeah\",\"description\":\"dvragpokddxejhh\"}") - .toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dvragpokddxejhh", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("twmlmhjnqtqeah", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobOutput model = - new MLFlowModelJobOutput() - .withDescription("dvragpokddxejhh") - .withMode(OutputDeliveryMode.UPLOAD) - .withUri("twmlmhjnqtqeah"); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dvragpokddxejhh", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("twmlmhjnqtqeah", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java deleted file mode 100644 index d878fc90c2169..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java +++ /dev/null @@ -1,71 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableData; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MLTableDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableData model = - BinaryData - .fromString( - "{\"dataType\":\"mltable\",\"referencedUris\":[\"uavt\",\"tbkewkqynspg\"],\"dataUri\":\"voffbkkwvdxae\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"rlj\",\"properties\":{\"lpbcjtrpz\":\"zbnobr\",\"qelwgdhuruzytza\":\"yudivbxnhsqeaeo\",\"mpinmzvfkneerzzt\":\"ogatmoljiy\",\"bnhrxlelfjhkeiz\":\"knsjulugd\"},\"tags\":{\"wjekptycaydbj\":\"htdm\"}}") - .toObject(MLTableData.class); - Assertions.assertEquals("rlj", model.description()); - Assertions.assertEquals("zbnobr", model.properties().get("lpbcjtrpz")); - Assertions.assertEquals("htdm", model.tags().get("wjekptycaydbj")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("voffbkkwvdxae", model.dataUri()); - Assertions.assertEquals("uavt", model.referencedUris().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableData model = - new MLTableData() - .withDescription("rlj") - .withProperties( - mapOf( - "lpbcjtrpz", - "zbnobr", - "qelwgdhuruzytza", - "yudivbxnhsqeaeo", - "mpinmzvfkneerzzt", - "ogatmoljiy", - "bnhrxlelfjhkeiz", - "knsjulugd")) - .withTags(mapOf("wjekptycaydbj", "htdm")) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("voffbkkwvdxae") - .withReferencedUris(Arrays.asList("uavt", "tbkewkqynspg")); - model = BinaryData.fromObject(model).toObject(MLTableData.class); - Assertions.assertEquals("rlj", model.description()); - Assertions.assertEquals("zbnobr", model.properties().get("lpbcjtrpz")); - Assertions.assertEquals("htdm", model.tags().get("wjekptycaydbj")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("voffbkkwvdxae", model.dataUri()); - Assertions.assertEquals("uavt", model.referencedUris().get(0)); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java deleted file mode 100644 index b3dc0b4dc534e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java +++ /dev/null @@ -1,34 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"pqinf\",\"description\":\"pyglqdhmrjzral\"}") - .toObject(MLTableJobInput.class); - Assertions.assertEquals("pyglqdhmrjzral", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("pqinf", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobInput model = - new MLTableJobInput().withDescription("pyglqdhmrjzral").withMode(InputDeliveryMode.DIRECT).withUri("pqinf"); - model = BinaryData.fromObject(model).toObject(MLTableJobInput.class); - Assertions.assertEquals("pyglqdhmrjzral", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("pqinf", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java deleted file mode 100644 index 5c66587aba526..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"mlcfnzhmhsurl\",\"description\":\"qkpmmzpstau\"}") - .toObject(MLTableJobOutput.class); - Assertions.assertEquals("qkpmmzpstau", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("mlcfnzhmhsurl", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobOutput model = - new MLTableJobOutput() - .withDescription("qkpmmzpstau") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("mlcfnzhmhsurl"); - model = BinaryData.fromObject(model).toObject(MLTableJobOutput.class); - Assertions.assertEquals("qkpmmzpstau", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("mlcfnzhmhsurl", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java deleted file mode 100644 index cd00ea9d950cf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedIdentity; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentity model = - BinaryData - .fromString( - "{\"identityType\":\"Managed\",\"clientId\":\"49930aac-491a-4ce3-99bb-f763f6db3ac3\",\"objectId\":\"2fd57264-6306-4a7e-bd5d-0d45048516e5\",\"resourceId\":\"clg\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3"), model.clientId()); - Assertions.assertEquals(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5"), model.objectId()); - Assertions.assertEquals("clg", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model = - new ManagedIdentity() - .withClientId(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3")) - .withObjectId(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5")) - .withResourceId("clg"); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3"), model.clientId()); - Assertions.assertEquals(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5"), model.objectId()); - Assertions.assertEquals("clg", model.resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 1109f7fc49d4e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,46 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"eedebc97-7cf9-49d6-8058-af89513b30b7\",\"tenantId\":\"022e8374-0d41-4bc5-8365-0eb3372a635f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ginuvamih\":{\"principalId\":\"f6324d70-bc8b-4552-95e1-03d0c14617f7\",\"clientId\":\"334d5ff8-4410-4858-b84d-54862312e602\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ginuvamih", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java deleted file mode 100644 index 36f27a2eb5f25..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -import org.junit.jupiter.api.Assertions; - -public final class MedianStoppingPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MedianStoppingPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"MedianStopping\",\"delayEvaluation\":2026820948,\"evaluationInterval\":660103653}") - .toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(2026820948, model.delayEvaluation()); - Assertions.assertEquals(660103653, model.evaluationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MedianStoppingPolicy model = - new MedianStoppingPolicy().withDelayEvaluation(2026820948).withEvaluationInterval(660103653); - model = BinaryData.fromObject(model).toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(2026820948, model.delayEvaluation()); - Assertions.assertEquals(660103653, model.evaluationInterval()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java deleted file mode 100644 index b1dce75cdfb41..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java +++ /dev/null @@ -1,71 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"gaqvlgafcqusrd\",\"nextVersion\":\"t\",\"description\":\"sdtutnwlduyc\",\"properties\":{\"kuqgsjjxundxgket\":\"hyrmewipmvekdx\",\"gpmuneqsxvmhfbuz\":\"zhhzjhfjmhvvmu\",\"ms\":\"yihsasbhudypohyu\"},\"tags\":{\"pfoobr\":\"sqy\",\"qdnfwqzdz\":\"ttymsjny\",\"fhqlyvi\":\"tilaxh\",\"ti\":\"ouwivkxoyzunbixx\"}},\"id\":\"cpwpg\",\"name\":\"lrcivtsoxfrke\",\"type\":\"xpmyyefrpmpdnq\"}") - .toObject(ModelContainerInner.class); - Assertions.assertEquals("sdtutnwlduyc", model.properties().description()); - Assertions.assertEquals("hyrmewipmvekdx", model.properties().properties().get("kuqgsjjxundxgket")); - Assertions.assertEquals("sqy", model.properties().tags().get("pfoobr")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerInner model = - new ModelContainerInner() - .withProperties( - new ModelContainerProperties() - .withDescription("sdtutnwlduyc") - .withProperties( - mapOf( - "kuqgsjjxundxgket", - "hyrmewipmvekdx", - "gpmuneqsxvmhfbuz", - "zhhzjhfjmhvvmu", - "ms", - "yihsasbhudypohyu")) - .withTags( - mapOf( - "pfoobr", - "sqy", - "qdnfwqzdz", - "ttymsjny", - "fhqlyvi", - "tilaxh", - "ti", - "ouwivkxoyzunbixx")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(ModelContainerInner.class); - Assertions.assertEquals("sdtutnwlduyc", model.properties().description()); - Assertions.assertEquals("hyrmewipmvekdx", model.properties().properties().get("kuqgsjjxundxgket")); - Assertions.assertEquals("sqy", model.properties().tags().get("pfoobr")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java deleted file mode 100644 index db0008fce8e14..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"waoqvmmb\",\"nextVersion\":\"qfr\",\"description\":\"lkzmegnitgvkxl\",\"properties\":{\"gcealzxwh\":\"drf\",\"yqhlwigdivbkbx\":\"ansym\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\"},\"tags\":{\"hpqgatjeaahhvj\":\"icddyvvjskgfmocw\",\"jjidjk\":\"hnakzyb\"}}") - .toObject(ModelContainerProperties.class); - Assertions.assertEquals("lkzmegnitgvkxl", model.description()); - Assertions.assertEquals("drf", model.properties().get("gcealzxwh")); - Assertions.assertEquals("icddyvvjskgfmocw", model.tags().get("hpqgatjeaahhvj")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerProperties model = - new ModelContainerProperties() - .withDescription("lkzmegnitgvkxl") - .withProperties( - mapOf( - "gcealzxwh", - "drf", - "yqhlwigdivbkbx", - "ansym", - "wasqvdaeyyg", - "omfaj", - "zkgimsid", - "xakjsqzhzb")) - .withTags(mapOf("hpqgatjeaahhvj", "icddyvvjskgfmocw", "jjidjk", "hnakzyb")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ModelContainerProperties.class); - Assertions.assertEquals("lkzmegnitgvkxl", model.description()); - Assertions.assertEquals("drf", model.properties().get("gcealzxwh")); - Assertions.assertEquals("icddyvvjskgfmocw", model.tags().get("hpqgatjeaahhvj")); - Assertions.assertEquals(false, model.isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index f1278bd93c0a8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,60 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"m\",\"value\":[{\"properties\":{\"isArchived\":false,\"latestVersion\":\"iwrxgkn\",\"nextVersion\":\"vyi\",\"description\":\"qodfvp\",\"properties\":{},\"tags\":{}},\"id\":\"xgsg\",\"name\":\"p\",\"type\":\"gzdjtxvzf\"}]}") - .toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("m", model.nextLink()); - Assertions.assertEquals("qodfvp", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerResourceArmPaginatedResult model = - new ModelContainerResourceArmPaginatedResult() - .withNextLink("m") - .withValue( - Arrays - .asList( - new ModelContainerInner() - .withProperties( - new ModelContainerProperties() - .withDescription("qodfvp") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false)))); - model = BinaryData.fromObject(model).toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("m", model.nextLink()); - Assertions.assertEquals("qodfvp", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index da6ac506a5730..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -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 ModelContainersCreateOrUpdateWithResponseMockTests { - @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\":{\"isArchived\":true,\"latestVersion\":\"ucfzluczdquu\",\"nextVersion\":\"ormvh\",\"description\":\"ielbprnq\",\"properties\":{\"nwsvhbngqiwye\":\"wzcqygg\",\"kunsbfjhhlwtpkv\":\"tobdrrpnre\",\"z\":\"geattbzkg\"},\"tags\":{\"x\":\"qsttewuvcysjeuf\",\"uxlvrhprrvbwonl\":\"lpditfnonpi\",\"huy\":\"qflvtlrvbst\"}},\"id\":\"n\",\"name\":\"nttlnrjd\",\"type\":\"zdbuzici\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = - manager - .modelContainers() - .define("iuepmaxfnzlpqmp") - .withExistingWorkspace("kvy", "fbqvumkxqj") - .withProperties( - new ModelContainerProperties() - .withDescription("rhfcaeooifqdyw") - .withProperties(mapOf("corkfrocgbmxl", "obhahqmomf", "zezbjes", "j")) - .withTags(mapOf("fygpnyhgd", "lurb", "a", "uqs", "y", "qyvoupr")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("ielbprnq", response.properties().description()); - Assertions.assertEquals("wzcqygg", response.properties().properties().get("nwsvhbngqiwye")); - Assertions.assertEquals("qsttewuvcysjeuf", response.properties().tags().get("x")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java deleted file mode 100644 index e845861d1b84d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 ModelContainersDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .modelContainers() - .deleteWithResponse("dwsngkr", "ihscjvakmhzbhw", "hf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java deleted file mode 100644 index ad48156c20db2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -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 ModelContainersGetWithResponseMockTests { - @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\":{\"isArchived\":true,\"latestVersion\":\"yrletndqlmf\",\"nextVersion\":\"gnbbuypwovvvsfle\",\"description\":\"noqayrehjuqwvap\",\"properties\":{\"qzubfonfd\":\"zhpzihacenqqzlx\",\"jcw\":\"gmkfw\",\"zl\":\"ewfhxwyrkbre\"},\"tags\":{\"mkaeplrajubow\":\"jpch\",\"aoklfnis\":\"ywevtjrieikmw\",\"tjcyyuv\":\"xgucbmtredscnn\",\"ecwwtz\":\"zrxzhc\"}},\"id\":\"cloyhy\",\"name\":\"pgidhzgyresgzsdt\",\"type\":\"wbyorjplbchych\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = - manager - .modelContainers() - .getWithResponse("wihbnnxemv", "nuqqkotauratnicp", "fzs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("noqayrehjuqwvap", response.properties().description()); - Assertions.assertEquals("zhpzihacenqqzlx", response.properties().properties().get("qzubfonfd")); - Assertions.assertEquals("jpch", response.properties().tags().get("mkaeplrajubow")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java deleted file mode 100644 index 2dfc509206074..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java +++ /dev/null @@ -1,74 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -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 ModelContainersListMockTests { - @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\":{\"isArchived\":true,\"latestVersion\":\"d\",\"nextVersion\":\"palvngtw\",\"description\":\"skwgqr\",\"properties\":{\"zuppiyx\":\"umdrcjlvkrkegty\"},\"tags\":{\"eqzqvabmhvs\":\"iydd\",\"ewxtrl\":\"xduetbapfc\",\"kjpirgzxvbczw\":\"bpxya\",\"i\":\"yegbthms\"}},\"id\":\"buiggrunozf\",\"name\":\"u\",\"type\":\"ljthoiv\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .modelContainers() - .list("xlxicwgp", "hdcfm", "z", 1474735813, ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("skwgqr", response.iterator().next().properties().description()); - Assertions.assertEquals("umdrcjlvkrkegty", response.iterator().next().properties().properties().get("zuppiyx")); - Assertions.assertEquals("iydd", response.iterator().next().properties().tags().get("eqzqvabmhvs")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java deleted file mode 100644 index 7c9bfac16a2e8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java +++ /dev/null @@ -1,79 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"flavors\":{\"ckknhxkizvy\":{\"data\":{}},\"rzvul\":{\"data\":{}},\"aaeranokqgukk\":{\"data\":{}},\"nvbroylaxx\":{\"data\":{}}},\"jobName\":\"cdisd\",\"modelType\":\"fj\",\"modelUri\":\"svgjrwhryvy\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"xgccknfnw\",\"properties\":{\"dxihc\":\"mvpdvjdhttzaef\",\"bg\":\"rphkmcrjdqnsdfz\",\"euutlwxezwzh\":\"gkylkdghr\"},\"tags\":{\"ehgpp\":\"bwnhhtql\",\"csheafidltugsr\":\"pifhpfeoajvgcxtx\"}},\"id\":\"mks\",\"name\":\"jhoiftxfkfweg\",\"type\":\"rhptilluc\"}") - .toObject(ModelVersionInner.class); - Assertions.assertEquals("xgccknfnw", model.properties().description()); - Assertions.assertEquals("mvpdvjdhttzaef", model.properties().properties().get("dxihc")); - Assertions.assertEquals("bwnhhtql", model.properties().tags().get("ehgpp")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("cdisd", model.properties().jobName()); - Assertions.assertEquals("fj", model.properties().modelType()); - Assertions.assertEquals("svgjrwhryvy", model.properties().modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionInner model = - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("xgccknfnw") - .withProperties( - mapOf("dxihc", "mvpdvjdhttzaef", "bg", "rphkmcrjdqnsdfz", "euutlwxezwzh", "gkylkdghr")) - .withTags(mapOf("ehgpp", "bwnhhtql", "csheafidltugsr", "pifhpfeoajvgcxtx")) - .withIsAnonymous(false) - .withIsArchived(false) - .withFlavors( - mapOf( - "ckknhxkizvy", - new FlavorData().withData(mapOf()), - "rzvul", - new FlavorData().withData(mapOf()), - "aaeranokqgukk", - new FlavorData().withData(mapOf()), - "nvbroylaxx", - new FlavorData().withData(mapOf()))) - .withJobName("cdisd") - .withModelType("fj") - .withModelUri("svgjrwhryvy")); - model = BinaryData.fromObject(model).toObject(ModelVersionInner.class); - Assertions.assertEquals("xgccknfnw", model.properties().description()); - Assertions.assertEquals("mvpdvjdhttzaef", model.properties().properties().get("dxihc")); - Assertions.assertEquals("bwnhhtql", model.properties().tags().get("ehgpp")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("cdisd", model.properties().jobName()); - Assertions.assertEquals("fj", model.properties().modelType()); - Assertions.assertEquals("svgjrwhryvy", model.properties().modelUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java deleted file mode 100644 index ebd2e8723618e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionProperties model = - BinaryData - .fromString( - "{\"flavors\":{\"a\":{\"data\":{\"sldrizetpwbral\":\"dqohmc\",\"qzmiza\":\"libph\"}},\"thwtzol\":{\"data\":{\"lhjlmuoyxprimr\":\"kjpdnjzhajo\",\"eislstvasylwx\":\"opteecj\",\"eoohguufuzboyj\":\"zaum\"}},\"zaapmudqmeqwi\":{\"data\":{\"lxveabfqx\":\"mwmdxmebwjscjpa\",\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\"}}},\"jobName\":\"ibudqwy\",\"modelType\":\"beybpmzznrtffyaq\",\"modelUri\":\"mhh\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"hvseufuqyrx\",\"properties\":{\"sismjqfrddga\":\"cgq\",\"disyirnxz\":\"quhiosrsjuivf\",\"revkhgnlnzo\":\"czexrxzbujrtrhqv\"},\"tags\":{\"tszcofizehtdhgb\":\"rpiqywncv\",\"reljeamur\":\"k\",\"xlpm\":\"zmlovuanash\"}}") - .toObject(ModelVersionProperties.class); - Assertions.assertEquals("hvseufuqyrx", model.description()); - Assertions.assertEquals("cgq", model.properties().get("sismjqfrddga")); - Assertions.assertEquals("rpiqywncv", model.tags().get("tszcofizehtdhgb")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("dqohmc", model.flavors().get("a").data().get("sldrizetpwbral")); - Assertions.assertEquals("ibudqwy", model.jobName()); - Assertions.assertEquals("beybpmzznrtffyaq", model.modelType()); - Assertions.assertEquals("mhh", model.modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionProperties model = - new ModelVersionProperties() - .withDescription("hvseufuqyrx") - .withProperties( - mapOf("sismjqfrddga", "cgq", "disyirnxz", "quhiosrsjuivf", "revkhgnlnzo", "czexrxzbujrtrhqv")) - .withTags(mapOf("tszcofizehtdhgb", "rpiqywncv", "reljeamur", "k", "xlpm", "zmlovuanash")) - .withIsAnonymous(true) - .withIsArchived(false) - .withFlavors( - mapOf( - "a", - new FlavorData().withData(mapOf("sldrizetpwbral", "dqohmc", "qzmiza", "libph")), - "thwtzol", - new FlavorData() - .withData( - mapOf( - "lhjlmuoyxprimr", - "kjpdnjzhajo", - "eislstvasylwx", - "opteecj", - "eoohguufuzboyj", - "zaum")), - "zaapmudqmeqwi", - new FlavorData() - .withData( - mapOf( - "lxveabfqx", "mwmdxmebwjscjpa", "ijddtvqc", "mwmqtibx", "jaeukmrsieekpn", "tad")))) - .withJobName("ibudqwy") - .withModelType("beybpmzznrtffyaq") - .withModelUri("mhh"); - model = BinaryData.fromObject(model).toObject(ModelVersionProperties.class); - Assertions.assertEquals("hvseufuqyrx", model.description()); - Assertions.assertEquals("cgq", model.properties().get("sismjqfrddga")); - Assertions.assertEquals("rpiqywncv", model.tags().get("tszcofizehtdhgb")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("dqohmc", model.flavors().get("a").data().get("sldrizetpwbral")); - Assertions.assertEquals("ibudqwy", model.jobName()); - Assertions.assertEquals("beybpmzznrtffyaq", model.modelType()); - Assertions.assertEquals("mhh", model.modelUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index bc48204938a5b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,97 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"xkyxvxevblbj\",\"value\":[{\"properties\":{\"flavors\":{},\"jobName\":\"lageuaulxun\",\"modelType\":\"jbnkpp\",\"modelUri\":\"nenlsvxeizzg\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"mffeycxcktpi\",\"properties\":{},\"tags\":{}},\"id\":\"teeammxqiekkkzd\",\"name\":\"rtkgdojbmxvavref\",\"type\":\"eesvecu\"},{\"properties\":{\"flavors\":{},\"jobName\":\"xtxsuwprtujw\",\"modelType\":\"wddji\",\"modelUri\":\"bxv\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"zeexavoxtfgle\",\"properties\":{},\"tags\":{}},\"id\":\"qbw\",\"name\":\"ypq\",\"type\":\"gsfjac\"},{\"properties\":{\"flavors\":{},\"jobName\":\"hhxud\",\"modelType\":\"vodhtn\",\"modelUri\":\"rudhzmmesckdl\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"x\",\"properties\":{},\"tags\":{}},\"id\":\"cfxwmdbox\",\"name\":\"fgsftufqob\",\"type\":\"jln\"}]}") - .toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("xkyxvxevblbj", model.nextLink()); - Assertions.assertEquals("mffeycxcktpi", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("lageuaulxun", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jbnkpp", model.value().get(0).properties().modelType()); - Assertions.assertEquals("nenlsvxeizzg", model.value().get(0).properties().modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionResourceArmPaginatedResult model = - new ModelVersionResourceArmPaginatedResult() - .withNextLink("xkyxvxevblbj") - .withValue( - Arrays - .asList( - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("mffeycxcktpi") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("lageuaulxun") - .withModelType("jbnkpp") - .withModelUri("nenlsvxeizzg")), - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("zeexavoxtfgle") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withFlavors(mapOf()) - .withJobName("xtxsuwprtujw") - .withModelType("wddji") - .withModelUri("bxv")), - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("x") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("hhxud") - .withModelType("vodhtn") - .withModelUri("rudhzmmesckdl")))); - model = BinaryData.fromObject(model).toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("xkyxvxevblbj", model.nextLink()); - Assertions.assertEquals("mffeycxcktpi", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("lageuaulxun", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jbnkpp", model.value().get(0).properties().modelType()); - Assertions.assertEquals("nenlsvxeizzg", model.value().get(0).properties().modelUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c8e1e71d6e400..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,114 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -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 ModelVersionsCreateOrUpdateWithResponseMockTests { - @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\":{\"flavors\":{},\"jobName\":\"icjuft\",\"modelType\":\"iooanduewfhv\",\"modelUri\":\"jhxzubfjzabbwzgv\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"dckixspsaigavkmv\",\"properties\":{\"yetjxryo\":\"erejrkpzj\",\"pemnrrabo\":\"taeitwhlbecgihz\"},\"tags\":{\"pskpeswyhhmif\":\"wxywpjhspboxhif\",\"y\":\"uajxwwvcmmpeg\",\"exbzbqufpnezsjza\":\"qvcml\",\"dror\":\"m\"}},\"id\":\"ogzmsimehtcuuwdh\",\"name\":\"qqhyhnimxtns\",\"type\":\"gi\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = - manager - .modelVersions() - .define("nmxynlsuqbwzst") - .withExistingModel("tfbjampq", "c", "a") - .withProperties( - new ModelVersionProperties() - .withDescription("okr") - .withProperties( - mapOf( - "pujzfl", "sgaojbtqpqsdoctp", "wlluunxhfwlfxz", "cdsgxceluji", "eupcknecexkgrv", "wu")) - .withTags( - mapOf( - "wawoxcgzbejqf", - "jdmngsytqpdzfyxc", - "xdwdrpazqjkrfm", - "ifopf", - "gtji", - "wotfcuu", - "cjjkmqenh", - "pgayiawohfmhnnzm")) - .withIsAnonymous(false) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("vpatrgjjk") - .withModelType("i") - .withModelUri("hoksmmculwk")) - .create(); - - Assertions.assertEquals("dckixspsaigavkmv", response.properties().description()); - Assertions.assertEquals("erejrkpzj", response.properties().properties().get("yetjxryo")); - Assertions.assertEquals("wxywpjhspboxhif", response.properties().tags().get("pskpeswyhhmif")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("icjuft", response.properties().jobName()); - Assertions.assertEquals("iooanduewfhv", response.properties().modelType()); - Assertions.assertEquals("jhxzubfjzabbwzgv", response.properties().modelUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index ccb3cf60148a0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 ModelVersionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .modelVersions() - .deleteWithResponse( - "rmuhcuhtuzlx", "wyopgarpfctwrapc", "dojq", "vzesipiys", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java deleted file mode 100644 index 4e24bc5af0c30..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -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 ModelVersionsGetWithResponseMockTests { - @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\":{\"flavors\":{},\"jobName\":\"yrkqa\",\"modelType\":\"fajfreprfvmki\",\"modelUri\":\"teyrqshi\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"pylblfsprrwc\",\"properties\":{\"rdytzfslxizhq\":\"mtcvvf\",\"cdiiisklbonx\":\"kmgobliqe\"},\"tags\":{\"wkosnyxigf\":\"jxvtrkfkgenjqnnp\",\"kwopswnyinxupr\":\"ujjcxgdqmrlhn\",\"uekdcpvu\":\"xyxwjezbfqplo\"}},\"id\":\"rsvjmnsvujnjktv\",\"name\":\"lefcjis\",\"type\":\"pkdbx\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = - manager - .modelVersions() - .getWithResponse( - "jqyowaadc", "dazabundtse", "kaupwhlz", "ckremgjlmsvdorsi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pylblfsprrwc", response.properties().description()); - Assertions.assertEquals("mtcvvf", response.properties().properties().get("rdytzfslxizhq")); - Assertions.assertEquals("jxvtrkfkgenjqnnp", response.properties().tags().get("wkosnyxigf")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("yrkqa", response.properties().jobName()); - Assertions.assertEquals("fajfreprfvmki", response.properties().modelType()); - Assertions.assertEquals("teyrqshi", response.properties().modelUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java deleted file mode 100644 index 3ce927ed9a2aa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -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 ModelVersionsListMockTests { - @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\":{\"flavors\":{},\"jobName\":\"cjiwgsxfaio\",\"modelType\":\"dgujjgnfgrzxbarc\",\"modelUri\":\"aefzqsy\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"cytesmf\",\"properties\":{\"uauzmz\":\"tfodq\"},\"tags\":{\"udxdyyrudmahswt\":\"trfzhhezvh\",\"sgfenffdxb\":\"dkxbq\"}},\"id\":\"fqjchivdrij\",\"name\":\"nxndmuvardlmzjo\",\"type\":\"p\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .modelVersions() - .list( - "ppoqvgpnewuhwfwj", - "oxuo", - "tfnressfepgck", - "cjmgvsnvbtqdxfm", - "ym", - 253482079, - "hjluqllbsupubdx", - "kdlhzwhc", - 1124583033, - "vbosjj", - "dizhrjqfyaytvsly", - "kcgn", - ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cytesmf", response.iterator().next().properties().description()); - Assertions.assertEquals("tfodq", response.iterator().next().properties().properties().get("uauzmz")); - Assertions.assertEquals("trfzhhezvh", response.iterator().next().properties().tags().get("udxdyyrudmahswt")); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("cjiwgsxfaio", response.iterator().next().properties().jobName()); - Assertions.assertEquals("dgujjgnfgrzxbarc", response.iterator().next().properties().modelType()); - Assertions.assertEquals("aefzqsy", response.iterator().next().properties().modelUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java deleted file mode 100644 index 44975c7627f61..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Mpi; -import org.junit.jupiter.api.Assertions; - -public final class MpiTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mpi model = - BinaryData - .fromString("{\"distributionType\":\"Mpi\",\"processCountPerInstance\":589201934}") - .toObject(Mpi.class); - Assertions.assertEquals(589201934, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mpi model = new Mpi().withProcessCountPerInstance(589201934); - model = BinaryData.fromObject(model).toObject(Mpi.class); - Assertions.assertEquals(589201934, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java deleted file mode 100644 index a68e62ee8d8bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; - -public final class NCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NCrossValidations model = - BinaryData.fromString("{\"mode\":\"NCrossValidations\"}").toObject(NCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NCrossValidations model = new NCrossValidations(); - model = BinaryData.fromObject(model).toObject(NCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java deleted file mode 100644 index 2ee39e50710c6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalFeaturizationSettings model = - BinaryData.fromString("{\"datasetLanguage\":\"ns\"}").toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("ns", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("ns"); - model = BinaryData.fromObject(model).toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("ns", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java deleted file mode 100644 index 772b65dcba64f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java +++ /dev/null @@ -1,36 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalLimitSettings model = - BinaryData - .fromString("{\"maxConcurrentTrials\":422661668,\"maxTrials\":768209268,\"timeout\":\"PT230H9M19S\"}") - .toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(422661668, model.maxConcurrentTrials()); - Assertions.assertEquals(768209268, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT230H9M19S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalLimitSettings model = - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(422661668) - .withMaxTrials(768209268) - .withTimeout(Duration.parse("PT230H9M19S")); - model = BinaryData.fromObject(model).toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(422661668, model.maxConcurrentTrials()); - Assertions.assertEquals(768209268, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT230H9M19S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java deleted file mode 100644 index e9e0709289f0b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java +++ /dev/null @@ -1,57 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVertical; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVertical model = - BinaryData - .fromString( - "{\"featurizationSettings\":{\"datasetLanguage\":\"ubmomsgvvjh\"},\"limitSettings\":{\"maxConcurrentTrials\":1113718862,\"maxTrials\":1386794835,\"timeout\":\"PT207H58M31S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"majnkd\",\"description\":\"q\"}}") - .toObject(NlpVertical.class); - Assertions.assertEquals("ubmomsgvvjh", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1113718862, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1386794835, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT207H58M31S"), model.limitSettings().timeout()); - Assertions.assertEquals("q", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("majnkd", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVertical model = - new NlpVertical() - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("ubmomsgvvjh")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1113718862) - .withMaxTrials(1386794835) - .withTimeout(Duration.parse("PT207H58M31S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("q") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("majnkd")); - model = BinaryData.fromObject(model).toObject(NlpVertical.class); - Assertions.assertEquals("ubmomsgvvjh", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1113718862, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1386794835, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT207H58M31S"), model.limitSettings().timeout()); - Assertions.assertEquals("q", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("majnkd", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java deleted file mode 100644 index a7c0d6a48f646..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NodeStateCounts; - -public final class NodeStateCountsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeStateCounts model = - BinaryData - .fromString( - "{\"idleNodeCount\":1191856604,\"runningNodeCount\":715935859,\"preparingNodeCount\":2047901283,\"unusableNodeCount\":1346181735,\"leavingNodeCount\":1358224808,\"preemptedNodeCount\":304822445}") - .toObject(NodeStateCounts.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeStateCounts model = new NodeStateCounts(); - model = BinaryData.fromObject(model).toObject(NodeStateCounts.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java deleted file mode 100644 index 5eae0e57bdc61..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import org.junit.jupiter.api.Assertions; - -public final class NoneAuthTypeWorkspaceConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model = - BinaryData - .fromString( - "{\"authType\":\"None\",\"category\":\"Git\",\"target\":\"lazipbhpwvq\",\"value\":\"ny\",\"valueFormat\":\"JSON\"}") - .toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("lazipbhpwvq", model.target()); - Assertions.assertEquals("ny", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model = - new NoneAuthTypeWorkspaceConnectionProperties() - .withCategory(ConnectionCategory.GIT) - .withTarget("lazipbhpwvq") - .withValue("ny") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("lazipbhpwvq", model.target()); - Assertions.assertEquals("ny", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java deleted file mode 100644 index 9dd9d12151240..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.Objective; -import org.junit.jupiter.api.Assertions; - -public final class ObjectiveTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Objective model = - BinaryData - .fromString("{\"goal\":\"Minimize\",\"primaryMetric\":\"qxjoshohtotryeg\"}") - .toObject(Objective.class); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - Assertions.assertEquals("qxjoshohtotryeg", model.primaryMetric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Objective model = new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("qxjoshohtotryeg"); - model = BinaryData.fromObject(model).toObject(Objective.class); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - Assertions.assertEquals("qxjoshohtotryeg", model.primaryMetric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index a326c433a7b9f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,201 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OnlineDeploymentTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineDeploymentTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"rprsnm\",\"value\":[{\"identity\":{\"principalId\":\"4da85e2a-d4e0-4d4c-95ab-041badbdf8b9\",\"tenantId\":\"16df482c-d39e-4be2-9abe-ddba471908e5\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"lbkpb\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":false,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"jh\",\"model\":\"vechndbnwiehole\",\"modelMountPath\":\"wiuub\",\"provisioningState\":\"Succeeded\",\"description\":\"aqtferr\",\"environmentId\":\"ex\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"xap\",\"tier\":\"Free\",\"size\":\"qqnobpudcd\",\"family\":\"tqwpwya\",\"capacity\":2036163978},\"location\":\"sqbuc\",\"tags\":{\"sdaultxij\":\"kyexaoguyaipi\",\"qwazlnqnmcjngzq\":\"um\",\"sf\":\"qxtbjwgnyf\"},\"id\":\"svtui\",\"name\":\"zh\",\"type\":\"jqg\"},{\"identity\":{\"principalId\":\"0ddd2460-1f6c-4ca7-a3bb-8be70bc2fc6a\",\"tenantId\":\"a55475da-8d74-41aa-b7bd-fc2075054554\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"qryxyn\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":true,\"egressPublicNetworkAccess\":\"Disabled\",\"instanceType\":\"sovwxznptgoeiyb\",\"model\":\"pfhvfslk\",\"modelMountPath\":\"tjlrigjksky\",\"provisioningState\":\"Creating\",\"description\":\"sxwaabzm\",\"environmentId\":\"rygznmmaxriz\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"gopxlhslnelxie\",\"tier\":\"Basic\",\"size\":\"llxecwc\",\"family\":\"jphslhcaw\",\"capacity\":224494261},\"location\":\"fdwfmvigorqj\",\"tags\":{\"n\":\"zhraglkafh\"},\"id\":\"juj\",\"name\":\"ickpz\",\"type\":\"cpopmxel\"},{\"identity\":{\"principalId\":\"0f14930d-5df5-4097-9b70-8c82d3a4bfcb\",\"tenantId\":\"bbf6d45e-ad6b-4e4a-97f7-a7c3941dcbf1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"edexxmlfm\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":true,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"uawxtzx\",\"model\":\"mwabzxrvxc\",\"modelMountPath\":\"hsphaivmxyas\",\"provisioningState\":\"Deleting\",\"description\":\"ywakoihk\",\"environmentId\":\"mjblmljhlny\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"qyryuzcbmqqvxm\",\"tier\":\"Standard\",\"size\":\"tayx\",\"family\":\"supe\",\"capacity\":2074822274},\"location\":\"qnhcvsqltnzoibg\",\"tags\":{\"qoxwd\":\"nxfyqonm\"},\"id\":\"fdbxiqxeiiqbim\",\"name\":\"tmwwi\",\"type\":\"h\"},{\"identity\":{\"principalId\":\"8b9a4105-dd9b-43ff-91e1-ba1a28c9f57b\",\"tenantId\":\"2a050a31-f610-475f-948f-53b51c0d42ca\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"vwbcblembnkbwv\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":false,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"vqihebwtswbzuwf\",\"model\":\"ragegi\",\"modelMountPath\":\"cjfelisdjubgg\",\"provisioningState\":\"Failed\",\"description\":\"sazgakgacyrcmj\",\"environmentId\":\"spofapvuhry\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"frzgbzjed\",\"tier\":\"Premium\",\"size\":\"vnlvxbcuiiznktwf\",\"family\":\"snvpdibmi\",\"capacity\":1037622433},\"location\":\"bzbkiw\",\"tags\":{\"ophzfylsgcrp\":\"n\",\"fwyfwlwxjwet\":\"bcunezzceze\",\"zvaylptrsqqw\":\"psihcla\"},\"id\":\"tcmwqkchc\",\"name\":\"waxfewzjkj\",\"type\":\"xfdeqvhpsyl\"}]}") - .toObject(OnlineDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("rprsnm", model.nextLink()); - Assertions.assertEquals("sqbuc", model.value().get(0).location()); - Assertions.assertEquals("kyexaoguyaipi", model.value().get(0).tags().get("sdaultxij")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lbkpb", model.value().get(0).kind()); - Assertions.assertEquals("aqtferr", model.value().get(0).properties().description()); - Assertions.assertEquals("ex", model.value().get(0).properties().environmentId()); - Assertions.assertEquals(false, model.value().get(0).properties().appInsightsEnabled()); - Assertions - .assertEquals( - EgressPublicNetworkAccessType.ENABLED, model.value().get(0).properties().egressPublicNetworkAccess()); - Assertions.assertEquals("jh", model.value().get(0).properties().instanceType()); - Assertions.assertEquals("vechndbnwiehole", model.value().get(0).properties().model()); - Assertions.assertEquals("wiuub", model.value().get(0).properties().modelMountPath()); - Assertions.assertEquals("xap", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("qqnobpudcd", model.value().get(0).sku().size()); - Assertions.assertEquals("tqwpwya", model.value().get(0).sku().family()); - Assertions.assertEquals(2036163978, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineDeploymentTrackedResourceArmPaginatedResult model = - new OnlineDeploymentTrackedResourceArmPaginatedResult() - .withNextLink("rprsnm") - .withValue( - Arrays - .asList( - new OnlineDeploymentInner() - .withLocation("sqbuc") - .withTags( - mapOf("sdaultxij", "kyexaoguyaipi", "qwazlnqnmcjngzq", "um", "sf", "qxtbjwgnyf")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("lbkpb") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("aqtferr") - .withEnvironmentId("ex") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(false) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("jh") - .withModel("vechndbnwiehole") - .withModelMountPath("wiuub")) - .withSku( - new Sku() - .withName("xap") - .withTier(SkuTier.FREE) - .withSize("qqnobpudcd") - .withFamily("tqwpwya") - .withCapacity(2036163978)), - new OnlineDeploymentInner() - .withLocation("fdwfmvigorqj") - .withTags(mapOf("n", "zhraglkafh")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("qryxyn") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("sxwaabzm") - .withEnvironmentId("rygznmmaxriz") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(true) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.DISABLED) - .withInstanceType("sovwxznptgoeiyb") - .withModel("pfhvfslk") - .withModelMountPath("tjlrigjksky")) - .withSku( - new Sku() - .withName("gopxlhslnelxie") - .withTier(SkuTier.BASIC) - .withSize("llxecwc") - .withFamily("jphslhcaw") - .withCapacity(224494261)), - new OnlineDeploymentInner() - .withLocation("qnhcvsqltnzoibg") - .withTags(mapOf("qoxwd", "nxfyqonm")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("edexxmlfm") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("ywakoihk") - .withEnvironmentId("mjblmljhlny") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(true) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("uawxtzx") - .withModel("mwabzxrvxc") - .withModelMountPath("hsphaivmxyas")) - .withSku( - new Sku() - .withName("qyryuzcbmqqvxm") - .withTier(SkuTier.STANDARD) - .withSize("tayx") - .withFamily("supe") - .withCapacity(2074822274)), - new OnlineDeploymentInner() - .withLocation("bzbkiw") - .withTags( - mapOf( - "ophzfylsgcrp", "n", "fwyfwlwxjwet", "bcunezzceze", "zvaylptrsqqw", "psihcla")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("vwbcblembnkbwv") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("sazgakgacyrcmj") - .withEnvironmentId("spofapvuhry") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(false) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("vqihebwtswbzuwf") - .withModel("ragegi") - .withModelMountPath("cjfelisdjubgg")) - .withSku( - new Sku() - .withName("frzgbzjed") - .withTier(SkuTier.PREMIUM) - .withSize("vnlvxbcuiiznktwf") - .withFamily("snvpdibmi") - .withCapacity(1037622433)))); - model = BinaryData.fromObject(model).toObject(OnlineDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("rprsnm", model.nextLink()); - Assertions.assertEquals("sqbuc", model.value().get(0).location()); - Assertions.assertEquals("kyexaoguyaipi", model.value().get(0).tags().get("sdaultxij")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lbkpb", model.value().get(0).kind()); - Assertions.assertEquals("aqtferr", model.value().get(0).properties().description()); - Assertions.assertEquals("ex", model.value().get(0).properties().environmentId()); - Assertions.assertEquals(false, model.value().get(0).properties().appInsightsEnabled()); - Assertions - .assertEquals( - EgressPublicNetworkAccessType.ENABLED, model.value().get(0).properties().egressPublicNetworkAccess()); - Assertions.assertEquals("jh", model.value().get(0).properties().instanceType()); - Assertions.assertEquals("vechndbnwiehole", model.value().get(0).properties().model()); - Assertions.assertEquals("wiuub", model.value().get(0).properties().modelMountPath()); - Assertions.assertEquals("xap", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("qqnobpudcd", model.value().get(0).sku().size()); - Assertions.assertEquals("tqwpwya", model.value().get(0).sku().family()); - Assertions.assertEquals(2036163978, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java deleted file mode 100644 index aba6309a97e8c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 OnlineDeploymentsDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .onlineDeployments() - .delete("mbhdo", "m", "ngkqlgxzduvxd", "xexatmdmnrs", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java deleted file mode 100644 index 260040167db7f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -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 OnlineDeploymentsGetLogsWithResponseMockTests { - @Test - public void testGetLogsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"content\":\"exvtemasp\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeploymentLogs response = - manager - .onlineDeployments() - .getLogsWithResponse( - "qtlfoz", - "umrtgjqg", - "cant", - "syxzxjmkanbc", - new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(129296832), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("exvtemasp", response.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java deleted file mode 100644 index 3ee3e1add3d89..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.SkuResource; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 OnlineDeploymentsListSkusMockTests { - @Test - public void testListSkus() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"capacity\":{\"default\":535751545,\"maximum\":1856017180,\"minimum\":1547287008,\"scaleType\":\"Automatic\"},\"resourceType\":\"iv\",\"sku\":{\"name\":\"jybsrwz\",\"tier\":\"Free\"}}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .onlineDeployments() - .listSkus("anydsc", "k", "w", "pwjc", 1694569219, "aahntofelfh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(535751545, response.iterator().next().capacity().defaultProperty()); - Assertions.assertEquals(1856017180, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1547287008, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, response.iterator().next().capacity().scaleType()); - Assertions.assertEquals("jybsrwz", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index b5c43b64a29e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,161 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OnlineEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineEndpointTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"hxgsrboldfor\",\"value\":[{\"identity\":{\"principalId\":\"1f6aefd4-b02f-4a33-a590-718f0cb48b50\",\"tenantId\":\"57f14320-4135-4edf-99b3-3048e39f355a\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"fhfovv\",\"properties\":{\"compute\":\"qpbtuodxes\",\"provisioningState\":\"Creating\",\"publicNetworkAccess\":\"Enabled\",\"traffic\":{},\"authMode\":\"AADToken\",\"description\":\"umuaslzkwrrwoycq\",\"properties\":{},\"scoringUri\":\"hahnomdrkywuhps\",\"swaggerUri\":\"uurutlwexxwlalni\"},\"sku\":{\"name\":\"zsrzpgepq\",\"tier\":\"Free\",\"size\":\"wwpgdakchzyvlixq\",\"family\":\"kcxk\",\"capacity\":330254773},\"location\":\"xmysuxswqrntv\",\"tags\":{\"pwcyyufmhr\":\"jpsttexoq\",\"wmqs\":\"nc\"},\"id\":\"kcdqzhlct\",\"name\":\"dunqnd\",\"type\":\"fpch\"},{\"identity\":{\"principalId\":\"a4151eb7-8663-4b97-8345-804b77541a0a\",\"tenantId\":\"7879de7c-a628-4534-a453-c05523e5b09d\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"cgegydcwbo\",\"properties\":{\"compute\":\"umvq\",\"provisioningState\":\"Succeeded\",\"publicNetworkAccess\":\"Disabled\",\"traffic\":{},\"authMode\":\"AMLToken\",\"description\":\"iouaubrjt\",\"properties\":{},\"scoringUri\":\"fuojrngif\",\"swaggerUri\":\"z\"},\"sku\":{\"name\":\"sccbiuimzd\",\"tier\":\"Premium\",\"size\":\"fqwmkyoquf\",\"family\":\"ruzslzoj\",\"capacity\":617076882},\"location\":\"fnmdxotn\",\"tags\":{\"i\":\"gugey\"},\"id\":\"grkyuizabsnmfpph\",\"name\":\"jee\",\"type\":\"yhyhsgzfczb\"},{\"identity\":{\"principalId\":\"ccf81f2a-7aba-4873-b90b-315fea316226\",\"tenantId\":\"eba5c18a-712b-44fe-9aa8-0765f707c485\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"glqgleoh\",\"properties\":{\"compute\":\"etnluankrrfx\",\"provisioningState\":\"Succeeded\",\"publicNetworkAccess\":\"Enabled\",\"traffic\":{},\"authMode\":\"Key\",\"description\":\"acvbmqz\",\"properties\":{},\"scoringUri\":\"lajrnwxacevehj\",\"swaggerUri\":\"yxoaf\"},\"sku\":{\"name\":\"oqltfae\",\"tier\":\"Standard\",\"size\":\"mfgvxirpghriypo\",\"family\":\"yhlqhykprlpyznu\",\"capacity\":184808617},\"location\":\"smexiitdf\",\"tags\":{\"nnust\":\"yasiibmiy\",\"nmgixh\":\"nlj\",\"oudorhcgyyp\":\"mavmq\",\"hu\":\"otwypundmb\"},\"id\":\"cmjkavlgorbmftpm\",\"name\":\"tzfjltf\",\"type\":\"nzcyjtotp\"}]}") - .toObject(OnlineEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("hxgsrboldfor", model.nextLink()); - Assertions.assertEquals("xmysuxswqrntv", model.value().get(0).location()); - Assertions.assertEquals("jpsttexoq", model.value().get(0).tags().get("pwcyyufmhr")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("fhfovv", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.AADTOKEN, model.value().get(0).properties().authMode()); - Assertions.assertEquals("umuaslzkwrrwoycq", model.value().get(0).properties().description()); - Assertions.assertEquals("qpbtuodxes", model.value().get(0).properties().compute()); - Assertions - .assertEquals(PublicNetworkAccessType.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.value().get(0).sku().size()); - Assertions.assertEquals("kcxk", model.value().get(0).sku().family()); - Assertions.assertEquals(330254773, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineEndpointTrackedResourceArmPaginatedResult model = - new OnlineEndpointTrackedResourceArmPaginatedResult() - .withNextLink("hxgsrboldfor") - .withValue( - Arrays - .asList( - new OnlineEndpointInner() - .withLocation("xmysuxswqrntv") - .withTags(mapOf("pwcyyufmhr", "jpsttexoq", "wmqs", "nc")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("fhfovv") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.AADTOKEN) - .withDescription("umuaslzkwrrwoycq") - .withProperties(mapOf()) - .withCompute("qpbtuodxes") - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("zsrzpgepq") - .withTier(SkuTier.FREE) - .withSize("wwpgdakchzyvlixq") - .withFamily("kcxk") - .withCapacity(330254773)), - new OnlineEndpointInner() - .withLocation("fnmdxotn") - .withTags(mapOf("i", "gugey")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("cgegydcwbo") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("iouaubrjt") - .withProperties(mapOf()) - .withCompute("umvq") - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("sccbiuimzd") - .withTier(SkuTier.PREMIUM) - .withSize("fqwmkyoquf") - .withFamily("ruzslzoj") - .withCapacity(617076882)), - new OnlineEndpointInner() - .withLocation("smexiitdf") - .withTags( - mapOf( - "nnust", - "yasiibmiy", - "nmgixh", - "nlj", - "oudorhcgyyp", - "mavmq", - "hu", - "otwypundmb")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("glqgleoh") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.KEY) - .withDescription("acvbmqz") - .withProperties(mapOf()) - .withCompute("etnluankrrfx") - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("oqltfae") - .withTier(SkuTier.STANDARD) - .withSize("mfgvxirpghriypo") - .withFamily("yhlqhykprlpyznu") - .withCapacity(184808617)))); - model = BinaryData.fromObject(model).toObject(OnlineEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("hxgsrboldfor", model.nextLink()); - Assertions.assertEquals("xmysuxswqrntv", model.value().get(0).location()); - Assertions.assertEquals("jpsttexoq", model.value().get(0).tags().get("pwcyyufmhr")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("fhfovv", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.AADTOKEN, model.value().get(0).properties().authMode()); - Assertions.assertEquals("umuaslzkwrrwoycq", model.value().get(0).properties().description()); - Assertions.assertEquals("qpbtuodxes", model.value().get(0).properties().compute()); - Assertions - .assertEquals(PublicNetworkAccessType.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.value().get(0).sku().size()); - Assertions.assertEquals("kcxk", model.value().get(0).sku().family()); - Assertions.assertEquals(330254773, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java deleted file mode 100644 index ebc153d904fdb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 OnlineEndpointsDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.onlineEndpoints().delete("cbnygd", "c", "xwbpwyykdig", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java deleted file mode 100644 index 29e7ab16920cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class OnlineRequestSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineRequestSettings model = - BinaryData - .fromString( - "{\"maxConcurrentRequestsPerInstance\":1659306080,\"maxQueueWait\":\"PT185H26M24S\",\"requestTimeout\":\"PT152H42M33S\"}") - .toObject(OnlineRequestSettings.class); - Assertions.assertEquals(1659306080, model.maxConcurrentRequestsPerInstance()); - Assertions.assertEquals(Duration.parse("PT185H26M24S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT152H42M33S"), model.requestTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineRequestSettings model = - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1659306080) - .withMaxQueueWait(Duration.parse("PT185H26M24S")) - .withRequestTimeout(Duration.parse("PT152H42M33S")); - model = BinaryData.fromObject(model).toObject(OnlineRequestSettings.class); - Assertions.assertEquals(1659306080, model.maxConcurrentRequestsPerInstance()); - Assertions.assertEquals(Duration.parse("PT185H26M24S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT152H42M33S"), model.requestTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java deleted file mode 100644 index e77786ec9dac2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings; - -public final class OnlineScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineScaleSettings model = - BinaryData.fromString("{\"scaleType\":\"OnlineScaleSettings\"}").toObject(OnlineScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineScaleSettings model = new OnlineScaleSettings(); - model = BinaryData.fromObject(model).toObject(OnlineScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java deleted file mode 100644 index 2e2d86093d611..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java +++ /dev/null @@ -1,72 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; -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 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\":[{\"name\":\"injdllwktlepo\",\"display\":{\"provider\":\"vqxuajgcqw\",\"resource\":\"ynkgfcfd\",\"operation\":\"wsikxxtclhuulr\",\"description\":\"byokvjgbzsxe\"},\"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); - })); - - MachineLearningManager manager = - MachineLearningManager - .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); - - Assertions.assertEquals("injdllwktlepo", response.iterator().next().name()); - Assertions.assertEquals("vqxuajgcqw", response.iterator().next().display().provider()); - Assertions.assertEquals("ynkgfcfd", response.iterator().next().display().resource()); - Assertions.assertEquals("wsikxxtclhuulr", response.iterator().next().display().operation()); - Assertions.assertEquals("byokvjgbzsxe", response.iterator().next().display().description()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java deleted file mode 100644 index 693f796d85b9d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java +++ /dev/null @@ -1,29 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class OutputPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutputPathAssetReference model = - BinaryData - .fromString("{\"referenceType\":\"OutputPath\",\"jobId\":\"h\",\"path\":\"mexznlwkb\"}") - .toObject(OutputPathAssetReference.class); - Assertions.assertEquals("h", model.jobId()); - Assertions.assertEquals("mexznlwkb", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutputPathAssetReference model = new OutputPathAssetReference().withJobId("h").withPath("mexznlwkb"); - model = BinaryData.fromObject(model).toObject(OutputPathAssetReference.class); - Assertions.assertEquals("h", model.jobId()); - Assertions.assertEquals("mexznlwkb", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java deleted file mode 100644 index 547ba53df3c1d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java +++ /dev/null @@ -1,97 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PaginatedComputeResourcesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PaginatedComputeResourcesList model = - BinaryData - .fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"6e82368f-483c-407c-b3d6-2d64ef6e71aa\",\"tenantId\":\"821c3424-4690-42c4-a22b-b51baca687f1\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"unmmq\",\"tags\":{\"ocukoklyax\":\"xzko\"},\"sku\":{\"name\":\"onuq\",\"tier\":\"Basic\",\"size\":\"beypewrmjmw\",\"family\":\"jektcxsenh\",\"capacity\":2036309182},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"rzpwvlqdqgbiq\",\"provisioningState\":\"Deleting\",\"description\":\"kaet\",\"createdOn\":\"2021-03-20T05:01:22Z\",\"modifiedOn\":\"2021-02-19T02:27:03Z\",\"resourceId\":\"ivfsnk\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false},\"id\":\"hjfbebrjcxe\",\"name\":\"fuwutttxf\",\"type\":\"jrbirphxepcyv\"}],\"nextLink\":\"fnljky\"}") - .toObject(PaginatedComputeResourcesList.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("unmmq", model.value().get(0).location()); - Assertions.assertEquals("xzko", model.value().get(0).tags().get("ocukoklyax")); - Assertions.assertEquals("onuq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).sku().size()); - Assertions.assertEquals("jektcxsenh", model.value().get(0).sku().family()); - Assertions.assertEquals(2036309182, model.value().get(0).sku().capacity()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.value().get(0).properties().computeLocation()); - Assertions.assertEquals("kaet", model.value().get(0).properties().description()); - Assertions.assertEquals("ivfsnk", model.value().get(0).properties().resourceId()); - Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth()); - Assertions.assertEquals("fnljky", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PaginatedComputeResourcesList model = - new PaginatedComputeResourcesList() - .withValue( - Arrays - .asList( - new ComputeResourceInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("unmmq") - .withTags(mapOf("ocukoklyax", "xzko")) - .withSku( - new Sku() - .withName("onuq") - .withTier(SkuTier.BASIC) - .withSize("beypewrmjmw") - .withFamily("jektcxsenh") - .withCapacity(2036309182)) - .withProperties( - new Compute() - .withComputeLocation("rzpwvlqdqgbiq") - .withDescription("kaet") - .withResourceId("ivfsnk") - .withDisableLocalAuth(false)))) - .withNextLink("fnljky"); - model = BinaryData.fromObject(model).toObject(PaginatedComputeResourcesList.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("unmmq", model.value().get(0).location()); - Assertions.assertEquals("xzko", model.value().get(0).tags().get("ocukoklyax")); - Assertions.assertEquals("onuq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).sku().size()); - Assertions.assertEquals("jektcxsenh", model.value().get(0).sku().family()); - Assertions.assertEquals(2036309182, model.value().get(0).sku().capacity()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.value().get(0).properties().computeLocation()); - Assertions.assertEquals("kaet", model.value().get(0).properties().description()); - Assertions.assertEquals("ivfsnk", model.value().get(0).properties().resourceId()); - Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth()); - Assertions.assertEquals("fnljky", model.nextLink()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java deleted file mode 100644 index c4a98b0fb36c6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java +++ /dev/null @@ -1,50 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"frvtpuqu\"},\"tags\":{\"doaon\":\"lgkfbt\",\"ed\":\"bjcntujitc\"}}") - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("frvtpuqu", model.properties().description()); - Assertions.assertEquals("lgkfbt", model.tags().get("doaon")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = - new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() - .withProperties(new PartialBatchDeployment().withDescription("frvtpuqu")) - .withTags(mapOf("doaon", "lgkfbt", "ed", "bjcntujitc")); - model = - BinaryData - .fromObject(model) - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("frvtpuqu", model.properties().description()); - Assertions.assertEquals("lgkfbt", model.tags().get("doaon")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java deleted file mode 100644 index bc27fbcb76184..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeployment model = - BinaryData.fromString("{\"description\":\"wwa\"}").toObject(PartialBatchDeployment.class); - Assertions.assertEquals("wwa", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeployment model = new PartialBatchDeployment().withDescription("wwa"); - model = BinaryData.fromObject(model).toObject(PartialBatchDeployment.class); - Assertions.assertEquals("wwa", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java deleted file mode 100644 index 939e861d2bb59..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialManagedServiceIdentity model = - BinaryData - .fromString("{\"type\":\"None\",\"userAssignedIdentities\":{\"dtmhrkwofyyvoqa\":\"dataibahwflus\"}}") - .toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialManagedServiceIdentity model = - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("dtmhrkwofyyvoqa", "dataibahwflus")); - model = BinaryData.fromObject(model).toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java deleted file mode 100644 index 7c2893c3737ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java +++ /dev/null @@ -1,42 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResource model = - BinaryData - .fromString("{\"tags\":{\"wbwo\":\"expbtg\",\"kcnqxwbpo\":\"nwashrtd\",\"aasipqi\":\"ulpiuj\"}}") - .toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("expbtg", model.tags().get("wbwo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResource model = - new PartialMinimalTrackedResource() - .withTags(mapOf("wbwo", "expbtg", "kcnqxwbpo", "nwashrtd", "aasipqi", "ulpiuj")); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("expbtg", model.tags().get("wbwo")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java deleted file mode 100644 index 6c42e362c03d4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model = - BinaryData - .fromString( - "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"opkwhojv\":\"datamg\",\"mocmbqfqvmk\":\"dataajqgxy\",\"helxprglya\":\"dataxozap\"}},\"tags\":{\"uejrjxgc\":\"ckcb\",\"i\":\"qibrhosxsdqrhzoy\"}}") - .toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("ckcb", model.tags().get("uejrjxgc")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model = - new PartialMinimalTrackedResourceWithIdentity() - .withTags(mapOf("uejrjxgc", "ckcb", "i", "qibrhosxsdqrhzoy")) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("opkwhojv", "datamg", "mocmbqfqvmk", "dataajqgxy", "helxprglya", "dataxozap"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("ckcb", model.tags().get("uejrjxgc")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java deleted file mode 100644 index dfc67b508652f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java +++ /dev/null @@ -1,62 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithSku model = - BinaryData - .fromString( - "{\"sku\":{\"capacity\":1978421071,\"family\":\"noamldsehaohdj\",\"name\":\"flzokxco\",\"size\":\"e\",\"tier\":\"Premium\"},\"tags\":{\"ftgz\":\"agltsxoa\"}}") - .toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("agltsxoa", model.tags().get("ftgz")); - Assertions.assertEquals(1978421071, model.sku().capacity()); - Assertions.assertEquals("noamldsehaohdj", model.sku().family()); - Assertions.assertEquals("flzokxco", model.sku().name()); - Assertions.assertEquals("e", model.sku().size()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSku model = - new PartialMinimalTrackedResourceWithSku() - .withTags(mapOf("ftgz", "agltsxoa")) - .withSku( - new PartialSku() - .withCapacity(1978421071) - .withFamily("noamldsehaohdj") - .withName("flzokxco") - .withSize("e") - .withTier(SkuTier.PREMIUM)); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("agltsxoa", model.tags().get("ftgz")); - Assertions.assertEquals(1978421071, model.sku().capacity()); - Assertions.assertEquals("noamldsehaohdj", model.sku().family()); - Assertions.assertEquals("flzokxco", model.sku().name()); - Assertions.assertEquals("e", model.sku().size()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java deleted file mode 100644 index 14f1c95632e06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class PartialSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialSku model = - BinaryData - .fromString( - "{\"capacity\":1425632159,\"family\":\"swvefloccsrmoz\",\"name\":\"m\",\"size\":\"g\",\"tier\":\"Free\"}") - .toObject(PartialSku.class); - Assertions.assertEquals(1425632159, model.capacity()); - Assertions.assertEquals("swvefloccsrmoz", model.family()); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("g", model.size()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialSku model = - new PartialSku() - .withCapacity(1425632159) - .withFamily("swvefloccsrmoz") - .withName("m") - .withSize("g") - .withTier(SkuTier.FREE); - model = BinaryData.fromObject(model).toObject(PartialSku.class); - Assertions.assertEquals(1425632159, model.capacity()); - Assertions.assertEquals("swvefloccsrmoz", model.family()); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("g", model.size()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java deleted file mode 100644 index 71ac532ecdcb1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Password; - -public final class PasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Password model = - BinaryData.fromString("{\"name\":\"pgvdf\",\"value\":\"otkftutqxlngx\"}").toObject(Password.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Password model = new Password(); - model = BinaryData.fromObject(model).toObject(Password.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java deleted file mode 100644 index ecc30fc061030..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; -import org.junit.jupiter.api.Assertions; - -public final class PersonalComputeInstanceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PersonalComputeInstanceSettings model = - BinaryData - .fromString("{\"assignedUser\":{\"objectId\":\"emc\",\"tenantId\":\"jk\"}}") - .toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("emc", model.assignedUser().objectId()); - Assertions.assertEquals("jk", model.assignedUser().tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PersonalComputeInstanceSettings model = - new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("emc").withTenantId("jk")); - model = BinaryData.fromObject(model).toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("emc", model.assignedUser().objectId()); - Assertions.assertEquals("jk", model.assignedUser().tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java deleted file mode 100644 index 9e4a3e6734b4c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PipelineJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PipelineJob model = - BinaryData - .fromString( - "{\"jobType\":\"Pipeline\",\"inputs\":{\"erufgjblcdrmy\":{\"jobInputType\":\"JobInput\",\"description\":\"khup\"},\"lugekdfqnhtt\":{\"jobInputType\":\"JobInput\",\"description\":\"emftzgyyky\"},\"kmhmnulwempdc\":{\"jobInputType\":\"JobInput\",\"description\":\"owrczfjjnnuxxr\"},\"sulwzpflusn\":{\"jobInputType\":\"JobInput\",\"description\":\"rhjul\"}},\"jobs\":{\"iyrgkoek\":\"datahhgzotf\"},\"outputs\":{\"pcqydeykvsk\":{\"jobOutputType\":\"JobOutput\",\"description\":\"xyxhighctxbxmo\"},\"boohxbms\":{\"jobOutputType\":\"JobOutput\",\"description\":\"zdfrjeizikgq\"},\"qaeo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"cqsxrmdvewu\"}},\"settings\":\"datajh\",\"sourceJobId\":\"jkbvhhdaurgho\",\"componentId\":\"aexbkhxjxjo\",\"computeId\":\"lqxr\",\"displayName\":\"knkob\",\"experimentName\":\"tmbozomtzamicbig\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"sotirei\":{\"endpoint\":\"znuxkeuairaabmdl\",\"errorMessage\":\"bedpfixlhupmomih\",\"jobServiceType\":\"dnpxpkcdpr\",\"port\":656606105,\"properties\":{\"ghflrufssjyghsf\":\"yi\",\"fgvqcpdw\":\"rkbhammgmqfm\",\"dcdjhunh\":\"gquxweysland\"},\"status\":\"cgawnrrnquo\"}},\"status\":\"Finalizing\",\"description\":\"bfsx\",\"properties\":{\"mxcjzlquzexokjx\":\"yilbvz\"},\"tags\":{\"bwmvogljsvl\":\"vbzinz\",\"nwcehaqidoyzl\":\"gi\",\"pepiaeapfs\":\"giomqo\",\"pqqncju\":\"rgdtpeqnacyheqw\"}}") - .toObject(PipelineJob.class); - Assertions.assertEquals("bfsx", model.description()); - Assertions.assertEquals("yilbvz", model.properties().get("mxcjzlquzexokjx")); - Assertions.assertEquals("vbzinz", model.tags().get("bwmvogljsvl")); - Assertions.assertEquals("aexbkhxjxjo", model.componentId()); - Assertions.assertEquals("lqxr", model.computeId()); - Assertions.assertEquals("knkob", model.displayName()); - Assertions.assertEquals("tmbozomtzamicbig", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("znuxkeuairaabmdl", model.services().get("sotirei").endpoint()); - Assertions.assertEquals("dnpxpkcdpr", model.services().get("sotirei").jobServiceType()); - Assertions.assertEquals(656606105, model.services().get("sotirei").port()); - Assertions.assertEquals("yi", model.services().get("sotirei").properties().get("ghflrufssjyghsf")); - Assertions.assertEquals("khup", model.inputs().get("erufgjblcdrmy").description()); - Assertions.assertEquals("xyxhighctxbxmo", model.outputs().get("pcqydeykvsk").description()); - Assertions.assertEquals("jkbvhhdaurgho", model.sourceJobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PipelineJob model = - new PipelineJob() - .withDescription("bfsx") - .withProperties(mapOf("mxcjzlquzexokjx", "yilbvz")) - .withTags( - mapOf( - "bwmvogljsvl", - "vbzinz", - "nwcehaqidoyzl", - "gi", - "pepiaeapfs", - "giomqo", - "pqqncju", - "rgdtpeqnacyheqw")) - .withComponentId("aexbkhxjxjo") - .withComputeId("lqxr") - .withDisplayName("knkob") - .withExperimentName("tmbozomtzamicbig") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "sotirei", - new JobService() - .withEndpoint("znuxkeuairaabmdl") - .withJobServiceType("dnpxpkcdpr") - .withPort(656606105) - .withProperties( - mapOf( - "ghflrufssjyghsf", "yi", "fgvqcpdw", "rkbhammgmqfm", "dcdjhunh", "gquxweysland")))) - .withInputs( - mapOf( - "erufgjblcdrmy", - new JobInput().withDescription("khup"), - "lugekdfqnhtt", - new JobInput().withDescription("emftzgyyky"), - "kmhmnulwempdc", - new JobInput().withDescription("owrczfjjnnuxxr"), - "sulwzpflusn", - new JobInput().withDescription("rhjul"))) - .withJobs(mapOf("iyrgkoek", "datahhgzotf")) - .withOutputs( - mapOf( - "pcqydeykvsk", - new JobOutput().withDescription("xyxhighctxbxmo"), - "boohxbms", - new JobOutput().withDescription("zdfrjeizikgq"), - "qaeo", - new JobOutput().withDescription("cqsxrmdvewu"))) - .withSettings("datajh") - .withSourceJobId("jkbvhhdaurgho"); - model = BinaryData.fromObject(model).toObject(PipelineJob.class); - Assertions.assertEquals("bfsx", model.description()); - Assertions.assertEquals("yilbvz", model.properties().get("mxcjzlquzexokjx")); - Assertions.assertEquals("vbzinz", model.tags().get("bwmvogljsvl")); - Assertions.assertEquals("aexbkhxjxjo", model.componentId()); - Assertions.assertEquals("lqxr", model.computeId()); - Assertions.assertEquals("knkob", model.displayName()); - Assertions.assertEquals("tmbozomtzamicbig", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("znuxkeuairaabmdl", model.services().get("sotirei").endpoint()); - Assertions.assertEquals("dnpxpkcdpr", model.services().get("sotirei").jobServiceType()); - Assertions.assertEquals(656606105, model.services().get("sotirei").port()); - Assertions.assertEquals("yi", model.services().get("sotirei").properties().get("ghflrufssjyghsf")); - Assertions.assertEquals("khup", model.inputs().get("erufgjblcdrmy").description()); - Assertions.assertEquals("xyxhighctxbxmo", model.outputs().get("pcqydeykvsk").description()); - Assertions.assertEquals("jkbvhhdaurgho", model.sourceJobId()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 6e4b39e897f0e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"pikxwczbyscnpqxu\",\"subnetArmId\":\"vyq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ybrk\",\"actionsRequired\":\"dumjgrtfwvuk\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"ab4618d0-89cc-42a6-8af9-01fb81852cef\",\"tenantId\":\"33dab1a2-cc10-43fe-bcce-1e2e3342c542\",\"type\":\"None\",\"userAssignedIdentities\":{\"jcny\":{\"principalId\":\"73635982-b45d-422a-a162-47fa604aa819\",\"clientId\":\"cb770753-bd37-4dd1-b217-83ceefddad2d\"},\"kryhtnapczwlokj\":{\"principalId\":\"fb641d5f-adfd-43a0-bbd2-8d16389dbfff\",\"clientId\":\"f16c80f3-21be-4d6c-96a3-e663540b9fad\"},\"kkvnipjox\":{\"principalId\":\"15196c0f-16a1-4607-bd2c-7b17b17dcafa\",\"clientId\":\"3a992dc1-89b1-4e46-adcb-e1f376ec6fd6\"}}},\"location\":\"nchgej\",\"tags\":{\"ahuxinpm\":\"dmailzydehojw\",\"vcputegj\":\"njaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\"},\"sku\":{\"name\":\"djpslw\",\"tier\":\"Premium\",\"size\":\"vwryoqpso\",\"family\":\"ctazakljlahbcryf\",\"capacity\":1389039399},\"id\":\"osygex\",\"name\":\"aojakhmsbzjhcrz\",\"type\":\"vdphlxaolthqtr\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("nchgej", model.location()); - Assertions.assertEquals("dmailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals("djpslw", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("vwryoqpso", model.sku().size()); - Assertions.assertEquals("ctazakljlahbcryf", model.sku().family()); - Assertions.assertEquals(1389039399, model.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ybrk", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dumjgrtfwvuk", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "jcny", - new UserAssignedIdentity(), - "kryhtnapczwlokj", - new UserAssignedIdentity(), - "kkvnipjox", - new UserAssignedIdentity()))) - .withLocation("nchgej") - .withTags( - mapOf( - "ahuxinpm", "dmailzydehojw", "vcputegj", "njaqwixjspro", "uuvmkjozkrwfnd", "wmfdatscmdvpjhul")) - .withSku( - new Sku() - .withName("djpslw") - .withTier(SkuTier.PREMIUM) - .withSize("vwryoqpso") - .withFamily("ctazakljlahbcryf") - .withCapacity(1389039399)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("ybrk") - .withActionsRequired("dumjgrtfwvuk")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("nchgej", model.location()); - Assertions.assertEquals("dmailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals("djpslw", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("vwryoqpso", model.sku().size()); - Assertions.assertEquals("ctazakljlahbcryf", model.sku().family()); - Assertions.assertEquals(1389039399, model.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ybrk", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dumjgrtfwvuk", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 225154582dcf3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,125 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"a16b0819-56bd-4218-8f63-1a6e43318690\",\"tenantId\":\"e99cad70-8299-4702-98fd-698d21448ff7\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"k\",\"tags\":{\"kphywpnvjto\":\"dhbt\"},\"sku\":{\"name\":\"ermclfplphoxuscr\",\"tier\":\"Basic\",\"size\":\"ye\",\"family\":\"bjtazqugxywpmu\",\"capacity\":737814385},\"id\":\"zwfqkqujidsuyon\",\"name\":\"bglaocqxtccm\",\"type\":\"yudxytlmoy\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"170fc112-1b20-4f58-819c-51041af9f532\",\"tenantId\":\"7ad71cc8-ee0b-4afa-8b0e-bab53c22c7f4\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"txhdzh\",\"tags\":{\"sbkyvpycanuzbp\":\"jbhckfrlhr\"},\"sku\":{\"name\":\"afkuwb\",\"tier\":\"Basic\",\"size\":\"bmehh\",\"family\":\"yvjusrtslhsp\",\"capacity\":1857421626},\"id\":\"maofmxagkv\",\"name\":\"melmqkrha\",\"type\":\"vljua\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"7ee1c31e-ec49-456e-8ea8-78f4129f7b6f\",\"tenantId\":\"0b889b39-707f-4b57-839f-013c448bcd09\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"alaexqpvfadmwsrc\",\"tags\":{\"zlfmisgwbnbbeld\":\"xpvgo\",\"ali\":\"wkz\"},\"sku\":{\"name\":\"rqhakauha\",\"tier\":\"Standard\",\"size\":\"wxosowzxcug\",\"family\":\"jooxdjebw\",\"capacity\":741000017},\"id\":\"wfvovbv\",\"name\":\"euecivyhzceuoj\",\"type\":\"jrwjueiotwm\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"f58ea4b5-f02e-496b-a143-d4e796072a44\",\"tenantId\":\"ccb2ecc9-f620-4ad9-9e68-75414abeb40c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"rjaw\",\"tags\":{\"fbkp\":\"gxhnisk\",\"lwn\":\"cg\"},\"sku\":{\"name\":\"hjdauwhvylwz\",\"tier\":\"Standard\",\"size\":\"xujznbmpowu\",\"family\":\"rzqlveu\",\"capacity\":1056372950},\"id\":\"j\",\"name\":\"khfxobbcswsrt\",\"type\":\"riplrbpbewtg\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("dhbt", model.value().get(0).tags().get("kphywpnvjto")); - Assertions.assertEquals("ermclfplphoxuscr", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("ye", model.value().get(0).sku().size()); - Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).sku().family()); - Assertions.assertEquals(737814385, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("k") - .withTags(mapOf("kphywpnvjto", "dhbt")) - .withSku( - new Sku() - .withName("ermclfplphoxuscr") - .withTier(SkuTier.BASIC) - .withSize("ye") - .withFamily("bjtazqugxywpmu") - .withCapacity(737814385)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("txhdzh") - .withTags(mapOf("sbkyvpycanuzbp", "jbhckfrlhr")) - .withSku( - new Sku() - .withName("afkuwb") - .withTier(SkuTier.BASIC) - .withSize("bmehh") - .withFamily("yvjusrtslhsp") - .withCapacity(1857421626)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("alaexqpvfadmwsrc") - .withTags(mapOf("zlfmisgwbnbbeld", "xpvgo", "ali", "wkz")) - .withSku( - new Sku() - .withName("rqhakauha") - .withTier(SkuTier.STANDARD) - .withSize("wxosowzxcug") - .withFamily("jooxdjebw") - .withCapacity(741000017)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("rjaw") - .withTags(mapOf("fbkp", "gxhnisk", "lwn", "cg")) - .withSku( - new Sku() - .withName("hjdauwhvylwz") - .withTier(SkuTier.STANDARD) - .withSize("xujznbmpowu") - .withFamily("rzqlveu") - .withCapacity(1056372950)))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("dhbt", model.value().get(0).tags().get("kphywpnvjto")); - Assertions.assertEquals("ermclfplphoxuscr", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("ye", model.value().get(0).sku().size()); - Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).sku().family()); - Assertions.assertEquals(737814385, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 2c41aa44579b6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,46 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"bpf\",\"subnetArmId\":\"s\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"v\",\"actionsRequired\":\"jrwzox\"},\"provisioningState\":\"Creating\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrwzox", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("v") - .withActionsRequired("jrwzox")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrwzox", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 6ce45394fe2b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,122 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests { - @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\":{\"privateEndpoint\":{\"id\":\"k\",\"subnetArmId\":\"zkdtzxsoed\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"li\",\"actionsRequired\":\"zomucmqgisnionet\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"6990e6f7-106a-433c-997d-a718208f7ce7\",\"tenantId\":\"38771c9c-5b53-4d64-924e-98d9bc7791cc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"kgtlzl\",\"tags\":{\"zkbnbmxl\":\"lxcznn\",\"g\":\"mwt\",\"ahfsgb\":\"qzusitoq\"},\"sku\":{\"name\":\"lreesrfwsszvlcwl\",\"tier\":\"Basic\",\"size\":\"ntfxxcrqmipfjwfo\",\"family\":\"izmshxxba\",\"capacity\":1165412558},\"id\":\"ulnvgskj\",\"name\":\"o\",\"type\":\"jdzjsjzn\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("dpwrp") - .withExistingWorkspace("ycpawm", "jp") - .withRegion("qp") - .withTags(mapOf("qgcnbhcbmjk", "zihqod", "n", "ti")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withSku( - new Sku() - .withName("ntsxjmfmeftvh") - .withTier(SkuTier.FREE) - .withSize("gjrhs") - .withFamily("w") - .withCapacity(2051010260)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("eyam") - .withActionsRequired("idmdiawpzxkzrntm")) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kgtlzl", response.location()); - Assertions.assertEquals("lxcznn", response.tags().get("zkbnbmxl")); - Assertions.assertEquals("lreesrfwsszvlcwl", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("ntfxxcrqmipfjwfo", response.sku().size()); - Assertions.assertEquals("izmshxxba", response.sku().family()); - Assertions.assertEquals(1165412558, response.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("li", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zomucmqgisnionet", response.privateLinkServiceConnectionState().actionsRequired()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index 65d4a6a1878a5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 PrivateEndpointConnectionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .privateEndpointConnections() - .deleteWithResponse("yuqh", "lmcskyk", "fuofixcnpcfykkp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 92b171c50ec4d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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\":\"wzlzklasl\",\"subnetArmId\":\"ciz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"arwp\",\"actionsRequired\":\"saudoejtighsx\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"77a4ccdb-fb26-4f04-884f-577353706d15\",\"tenantId\":\"82e5dd6c-ed00-424d-b9d3-56306a3b5e26\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"ahovuuw\",\"tags\":{\"jnhj\":\"e\",\"fbbcngkegxcypxbb\":\"oti\",\"qlf\":\"etwilyrzoxpd\"},\"sku\":{\"name\":\"lqownkiua\",\"tier\":\"Free\",\"size\":\"ahwkxjjm\",\"family\":\"nlmsoo\",\"capacity\":1046371938},\"id\":\"ecdh\",\"name\":\"yswcrptveajczx\",\"type\":\"lgsrgkrfizrpywlp\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("bkbdhlltqstqkqs", "gxiynecovagzk", "eubanlxunpqcc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("ahovuuw", response.location()); - Assertions.assertEquals("e", response.tags().get("jnhj")); - Assertions.assertEquals("lqownkiua", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("ahwkxjjm", response.sku().size()); - Assertions.assertEquals("nlmsoo", response.sku().family()); - Assertions.assertEquals(1046371938, response.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("arwp", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("saudoejtighsx", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 499e64fc382e4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 PrivateEndpointConnectionsListMockTests { - @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\":{\"privateEndpoint\":{\"id\":\"m\",\"subnetArmId\":\"wrjlvzkl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"ikyjtkakvlb\",\"actionsRequired\":\"hjvpzaptu\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"a1ace026-f3aa-406c-8a65-a498830c671a\",\"tenantId\":\"c3c04e1d-18fa-479e-90c4-b10480fc598c\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"wfgcdiykkcxwn\",\"tags\":{\"qohhihra\":\"qynvavitmdm\",\"rhlhpvzadbwenni\":\"quddrwjclj\",\"viqlluk\":\"afhxrzfrmvztiuc\"},\"sku\":{\"name\":\"rcqxgcbvzarmqc\",\"tier\":\"Premium\",\"size\":\"stsinvag\",\"family\":\"jyhdrxb\",\"capacity\":1587779031},\"id\":\"ehqwhitxnmxgn\",\"name\":\"guzbuw\",\"type\":\"orbalkj\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().list("ti", "zkaugpucdocfqpl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("wfgcdiykkcxwn", response.iterator().next().location()); - Assertions.assertEquals("qynvavitmdm", response.iterator().next().tags().get("qohhihra")); - Assertions.assertEquals("rcqxgcbvzarmqc", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals("stsinvag", response.iterator().next().sku().size()); - Assertions.assertEquals("jyhdrxb", response.iterator().next().sku().family()); - Assertions.assertEquals(1587779031, response.iterator().next().sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("ikyjtkakvlb", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "hjvpzaptu", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java deleted file mode 100644 index aa276bedb6103..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = - BinaryData.fromString("{\"id\":\"elluwfziton\",\"subnetArmId\":\"qfpjk\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 5ac2e05981140..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java +++ /dev/null @@ -1,120 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"c\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"7350756a-3e63-4658-9b36-a4c2e5f3a6d9\",\"tenantId\":\"02570bb2-e352-4d93-9bd1-d3451723dd5b\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"jkbegibtnmxiebww\",\"tags\":{\"tzjuzgwyzmhtxo\":\"ayqcgw\",\"nftguvriuhpr\":\"gmtsavjcbpwxqpsr\"},\"sku\":{\"name\":\"dyvxqtayriww\",\"tier\":\"Premium\",\"size\":\"bexrmcq\",\"family\":\"ycnojvknmefqsg\",\"capacity\":488274582},\"id\":\"apj\",\"name\":\"zhpvgqzcjrvxd\",\"type\":\"zlmwlxkvugfhz\"},{\"properties\":{\"groupId\":\"wjvzunluthnn\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"6cd9bb2d-0450-4976-a3e0-e2008cd6e042\",\"tenantId\":\"9dd771d6-e628-44bb-a9c6-f9185d3fbc61\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"pjzu\",\"tags\":{\"kzbbtd\":\"xdult\",\"bsjyofdx\":\"umveekgpwozuhkf\",\"oekqvk\":\"uusdttouwa\",\"vbxwyjsflhh\":\"lns\"},\"sku\":{\"name\":\"aln\",\"tier\":\"Premium\",\"size\":\"sxyawjoyaqcs\",\"family\":\"jpkiidzyexznelix\",\"capacity\":705550222},\"id\":\"tfolhbnx\",\"name\":\"nalaulppg\",\"type\":\"dtpnapnyiropuhp\"},{\"properties\":{\"groupId\":\"pgylg\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"87b8d495-467b-4407-881f-0443f65da17d\",\"tenantId\":\"79df8e42-2e01-42d2-92af-39e2c1627e59\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"v\",\"tags\":{\"rmgucnap\":\"ynqwwncwzzhxgk\",\"oellwp\":\"t\",\"qrhhu\":\"fdygpfqbuaceopz\"},\"sku\":{\"name\":\"pppcqeqxo\",\"tier\":\"Standard\",\"size\":\"hzxct\",\"family\":\"gbkdmoizpos\",\"capacity\":1176728044},\"id\":\"cfbu\",\"name\":\"rmfqjhhkxbpvj\",\"type\":\"mjh\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("jkbegibtnmxiebww", model.value().get(0).location()); - Assertions.assertEquals("ayqcgw", model.value().get(0).tags().get("tzjuzgwyzmhtxo")); - Assertions.assertEquals("dyvxqtayriww", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("bexrmcq", model.value().get(0).sku().size()); - Assertions.assertEquals("ycnojvknmefqsg", model.value().get(0).sku().family()); - Assertions.assertEquals(488274582, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultInner model = - new PrivateLinkResourceListResultInner() - .withValue( - Arrays - .asList( - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("jkbegibtnmxiebww") - .withTags(mapOf("tzjuzgwyzmhtxo", "ayqcgw", "nftguvriuhpr", "gmtsavjcbpwxqpsr")) - .withSku( - new Sku() - .withName("dyvxqtayriww") - .withTier(SkuTier.PREMIUM) - .withSize("bexrmcq") - .withFamily("ycnojvknmefqsg") - .withCapacity(488274582)) - .withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("pjzu") - .withTags( - mapOf( - "kzbbtd", - "xdult", - "bsjyofdx", - "umveekgpwozuhkf", - "oekqvk", - "uusdttouwa", - "vbxwyjsflhh", - "lns")) - .withSku( - new Sku() - .withName("aln") - .withTier(SkuTier.PREMIUM) - .withSize("sxyawjoyaqcs") - .withFamily("jpkiidzyexznelix") - .withCapacity(705550222)) - .withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("v") - .withTags( - mapOf("rmgucnap", "ynqwwncwzzhxgk", "oellwp", "t", "qrhhu", "fdygpfqbuaceopz")) - .withSku( - new Sku() - .withName("pppcqeqxo") - .withTier(SkuTier.STANDARD) - .withSize("hzxct") - .withFamily("gbkdmoizpos") - .withCapacity(1176728044)) - .withRequiredZoneNames(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("jkbegibtnmxiebww", model.value().get(0).location()); - Assertions.assertEquals("ayqcgw", model.value().get(0).tags().get("tzjuzgwyzmhtxo")); - Assertions.assertEquals("dyvxqtayriww", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("bexrmcq", model.value().get(0).sku().size()); - Assertions.assertEquals("ycnojvknmefqsg", model.value().get(0).sku().family()); - Assertions.assertEquals(488274582, model.value().get(0).sku().capacity()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 2a47ff8596969..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"ifthnz\",\"requiredMembers\":[\"sl\",\"nayqi\",\"ynduha\",\"hqlkthumaqo\"],\"requiredZoneNames\":[\"ycduier\",\"gccymvaolpssl\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ycduier", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("ycduier", "gccymvaolpssl")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ycduier", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java deleted file mode 100644 index b69f2148738bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"yngudivk\",\"requiredMembers\":[\"wbxqzvszjfau\",\"j\"],\"requiredZoneNames\":[\"xivetvt\",\"qaqtdoqmcbxvwvxy\"]},\"identity\":{\"principalId\":\"5fc3592b-d219-44be-b65a-2e2b3de76d9f\",\"tenantId\":\"712bd8ad-1151-45f2-bf61-d3e7de7dee99\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"blytk\":{\"principalId\":\"a95d1cdd-f7ed-4f87-a472-8a4bf616620d\",\"clientId\":\"f6f8621d-afad-499a-badb-6ecb26a9f3bb\"},\"pe\":{\"principalId\":\"fca7d1ee-b91d-42ac-9117-8d0ab41ca837\",\"clientId\":\"02cc4e93-4a44-44b6-a4b9-9f73d769c0c8\"},\"fbkrvrnsvs\":{\"principalId\":\"6434654b-4b63-4930-a988-6c07d2c784db\",\"clientId\":\"52f29274-c586-42d1-b67f-e1d18d5fb113\"}}},\"location\":\"johxcrsb\",\"tags\":{\"wbhsqfsub\":\"asrru\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\"},\"sku\":{\"name\":\"ftpvjzbexil\",\"tier\":\"Basic\",\"size\":\"qqnvwpmq\",\"family\":\"ruoujmk\",\"capacity\":1426920839},\"id\":\"qytjrybnwjewgd\",\"name\":\"jervnaenqpehi\",\"type\":\"doy\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("johxcrsb", model.location()); - Assertions.assertEquals("asrru", model.tags().get("wbhsqfsub")); - Assertions.assertEquals("ftpvjzbexil", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("qqnvwpmq", model.sku().size()); - Assertions.assertEquals("ruoujmk", model.sku().family()); - Assertions.assertEquals(1426920839, model.sku().capacity()); - Assertions.assertEquals("xivetvt", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResource model = - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "blytk", - new UserAssignedIdentity(), - "pe", - new UserAssignedIdentity(), - "fbkrvrnsvs", - new UserAssignedIdentity()))) - .withLocation("johxcrsb") - .withTags(mapOf("wbhsqfsub", "asrru", "rxbpyb", "gjb", "twss", "rfbjf")) - .withSku( - new Sku() - .withName("ftpvjzbexil") - .withTier(SkuTier.BASIC) - .withSize("qqnvwpmq") - .withFamily("ruoujmk") - .withCapacity(1426920839)) - .withRequiredZoneNames(Arrays.asList("xivetvt", "qaqtdoqmcbxvwvxy")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("johxcrsb", model.location()); - Assertions.assertEquals("asrru", model.tags().get("wbhsqfsub")); - Assertions.assertEquals("ftpvjzbexil", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("qqnvwpmq", model.sku().size()); - Assertions.assertEquals("ruoujmk", model.sku().family()); - Assertions.assertEquals(1426920839, model.sku().capacity()); - Assertions.assertEquals("xivetvt", model.requiredZoneNames().get(0)); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java deleted file mode 100644 index 8cd519e982946..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -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 PrivateLinkResourcesListWithResponseMockTests { - @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\":[{\"location\":\"c\",\"tags\":{\"m\":\"fshksnyzmspamwb\",\"qdktwtkvihlp\":\"nlslcef\",\"zhwv\":\"liwoyngu\"},\"id\":\"p\",\"name\":\"mhjhaus\",\"type\":\"b\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResult response = - manager - .privateLinkResources() - .listWithResponse("hxqqmqip", "y", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("c", response.value().get(0).location()); - Assertions.assertEquals("fshksnyzmspamwb", response.value().get(0).tags().get("m")); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 49d48777e4404..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"fpdvhpfxxypi\",\"actionsRequired\":\"nmayhuybb\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("fpdvhpfxxypi", model.description()); - Assertions.assertEquals("nmayhuybb", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("fpdvhpfxxypi") - .withActionsRequired("nmayhuybb"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("fpdvhpfxxypi", model.description()); - Assertions.assertEquals("nmayhuybb", model.actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java deleted file mode 100644 index a2503cf5c9cbd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ProbeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProbeSettings model = - BinaryData - .fromString( - "{\"failureThreshold\":1906628483,\"initialDelay\":\"PT113H32M27S\",\"period\":\"PT148H10M\",\"successThreshold\":619019093,\"timeout\":\"PT78H24M37S\"}") - .toObject(ProbeSettings.class); - Assertions.assertEquals(1906628483, model.failureThreshold()); - Assertions.assertEquals(Duration.parse("PT113H32M27S"), model.initialDelay()); - Assertions.assertEquals(Duration.parse("PT148H10M"), model.period()); - Assertions.assertEquals(619019093, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT78H24M37S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProbeSettings model = - new ProbeSettings() - .withFailureThreshold(1906628483) - .withInitialDelay(Duration.parse("PT113H32M27S")) - .withPeriod(Duration.parse("PT148H10M")) - .withSuccessThreshold(619019093) - .withTimeout(Duration.parse("PT78H24M37S")); - model = BinaryData.fromObject(model).toObject(ProbeSettings.class); - Assertions.assertEquals(1906628483, model.failureThreshold()); - Assertions.assertEquals(Duration.parse("PT113H32M27S"), model.initialDelay()); - Assertions.assertEquals(Duration.parse("PT148H10M"), model.period()); - Assertions.assertEquals(619019093, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT78H24M37S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java deleted file mode 100644 index 4400de400ecd2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PyTorch; -import org.junit.jupiter.api.Assertions; - -public final class PyTorchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PyTorch model = - BinaryData - .fromString("{\"distributionType\":\"PyTorch\",\"processCountPerInstance\":1314386445}") - .toObject(PyTorch.class); - Assertions.assertEquals(1314386445, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyTorch model = new PyTorch().withProcessCountPerInstance(1314386445); - model = BinaryData.fromObject(model).toObject(PyTorch.class); - Assertions.assertEquals(1314386445, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java deleted file mode 100644 index a68e619c802bd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import org.junit.jupiter.api.Assertions; - -public final class QuotaBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaBaseProperties model = - BinaryData - .fromString( - "{\"id\":\"ozmyzydagfu\",\"type\":\"bezy\",\"limit\":1156651479695546396,\"unit\":\"Count\"}") - .toObject(QuotaBaseProperties.class); - Assertions.assertEquals("ozmyzydagfu", model.id()); - Assertions.assertEquals("bezy", model.type()); - Assertions.assertEquals(1156651479695546396L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaBaseProperties model = - new QuotaBaseProperties() - .withId("ozmyzydagfu") - .withType("bezy") - .withLimit(1156651479695546396L) - .withUnit(QuotaUnit.COUNT); - model = BinaryData.fromObject(model).toObject(QuotaBaseProperties.class); - Assertions.assertEquals("ozmyzydagfu", model.id()); - Assertions.assertEquals("bezy", model.type()); - Assertions.assertEquals(1156651479695546396L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java deleted file mode 100644 index cdd5e013b5a5d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java +++ /dev/null @@ -1,49 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class QuotaUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaUpdateParameters model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"oaeupfhyhltrpmo\",\"type\":\"mcmatuokthfuiu\",\"limit\":6209557393905029674,\"unit\":\"Count\"}],\"location\":\"kvxod\"}") - .toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("oaeupfhyhltrpmo", model.value().get(0).id()); - Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).type()); - Assertions.assertEquals(6209557393905029674L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("kvxod", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUpdateParameters model = - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId("oaeupfhyhltrpmo") - .withType("mcmatuokthfuiu") - .withLimit(6209557393905029674L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("kvxod"); - model = BinaryData.fromObject(model).toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("oaeupfhyhltrpmo", model.value().get(0).id()); - Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).type()); - Assertions.assertEquals(6209557393905029674L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("kvxod", model.location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java deleted file mode 100644 index 64b726ec63d5f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; -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 QuotasListMockTests { - @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\":[{\"id\":\"txop\",\"amlWorkspaceLocation\":\"hpadkmdzg\",\"type\":\"zxvctkbbxuharls\",\"name\":{\"value\":\"ccla\",\"localizedValue\":\"oyn\"},\"limit\":3258721915949075156,\"unit\":\"Count\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.quotas().list("drhutfdo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java deleted file mode 100644 index 331408e61af21..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java +++ /dev/null @@ -1,93 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -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 QuotasUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"ud\",\"type\":\"ckaprhknqiijge\",\"limit\":564973110703252614,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"qih\",\"type\":\"yowltj\",\"limit\":818494289048822861,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"},{\"id\":\"ieproqksmfxm\",\"type\":\"prstvkitbfj\",\"limit\":2706549674295489273,\"unit\":\"Count\",\"status\":\"Success\"}],\"nextLink\":\"acqoccqrqxwetj\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateWorkspaceQuotasResult response = - manager - .quotas() - .updateWithResponse( - "aaneakhtmhobcya", - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId("qtvkh") - .withType("oog") - .withLimit(8839691341349880163L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId("qymhcctopuow") - .withType("nskby") - .withLimit(4791092419176992520L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId("gx") - .withType("ajpxecxqnwhscoza") - .withLimit(5738000548376016022L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("pknpwirfljfewxq"), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java deleted file mode 100644 index fc93ee725ae10..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java +++ /dev/null @@ -1,31 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule; -import org.junit.jupiter.api.Assertions; - -public final class RandomSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RandomSamplingAlgorithm model = - BinaryData - .fromString("{\"samplingAlgorithmType\":\"Random\",\"rule\":\"Random\",\"seed\":1677252615}") - .toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - Assertions.assertEquals(1677252615, model.seed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RandomSamplingAlgorithm model = - new RandomSamplingAlgorithm().withRule(RandomSamplingAlgorithmRule.RANDOM).withSeed(1677252615); - model = BinaryData.fromObject(model).toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - Assertions.assertEquals(1677252615, model.seed()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java deleted file mode 100644 index f20c15c87d6fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceSchedule model = - BinaryData - .fromString( - "{\"hours\":[2030386405,1910653936,488610875,1439896312],\"minutes\":[1083020573],\"monthDays\":[1541422170,1378797079,254990993],\"weekDays\":[\"Friday\",\"Saturday\",\"Saturday\"]}") - .toObject(RecurrenceSchedule.class); - Assertions.assertEquals(2030386405, model.hours().get(0)); - Assertions.assertEquals(1083020573, model.minutes().get(0)); - Assertions.assertEquals(1541422170, model.monthDays().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceSchedule model = - new RecurrenceSchedule() - .withHours(Arrays.asList(2030386405, 1910653936, 488610875, 1439896312)) - .withMinutes(Arrays.asList(1083020573)) - .withMonthDays(Arrays.asList(1541422170, 1378797079, 254990993)) - .withWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.SATURDAY, WeekDay.SATURDAY)); - model = BinaryData.fromObject(model).toObject(RecurrenceSchedule.class); - Assertions.assertEquals(2030386405, model.hours().get(0)); - Assertions.assertEquals(1083020573, model.minutes().get(0)); - Assertions.assertEquals(1541422170, model.monthDays().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java deleted file mode 100644 index f2509ff03af75..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java +++ /dev/null @@ -1,60 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceTrigger model = - BinaryData - .fromString( - "{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":712298972,\"schedule\":{\"hours\":[2143245313,620966114],\"minutes\":[41999694,2076319922],\"monthDays\":[2043297749,1561277343,1217879659,986610623],\"weekDays\":[\"Wednesday\",\"Monday\"]},\"endTime\":\"rlktgjcsggu\",\"startTime\":\"eml\",\"timeZone\":\"waeeczgfb\"}") - .toObject(RecurrenceTrigger.class); - Assertions.assertEquals("rlktgjcsggu", model.endTime()); - Assertions.assertEquals("eml", model.startTime()); - Assertions.assertEquals("waeeczgfb", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.frequency()); - Assertions.assertEquals(712298972, model.interval()); - Assertions.assertEquals(2143245313, model.schedule().hours().get(0)); - Assertions.assertEquals(41999694, model.schedule().minutes().get(0)); - Assertions.assertEquals(2043297749, model.schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceTrigger model = - new RecurrenceTrigger() - .withEndTime("rlktgjcsggu") - .withStartTime("eml") - .withTimeZone("waeeczgfb") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(712298972) - .withSchedule( - new RecurrenceSchedule() - .withHours(Arrays.asList(2143245313, 620966114)) - .withMinutes(Arrays.asList(41999694, 2076319922)) - .withMonthDays(Arrays.asList(2043297749, 1561277343, 1217879659, 986610623)) - .withWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.MONDAY))); - model = BinaryData.fromObject(model).toObject(RecurrenceTrigger.class); - Assertions.assertEquals("rlktgjcsggu", model.endTime()); - Assertions.assertEquals("eml", model.startTime()); - Assertions.assertEquals("waeeczgfb", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.frequency()); - Assertions.assertEquals(712298972, model.interval()); - Assertions.assertEquals(2143245313, model.schedule().hours().get(0)); - Assertions.assertEquals(41999694, model.schedule().minutes().get(0)); - Assertions.assertEquals(2043297749, model.schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java deleted file mode 100644 index 4151764643b30..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java +++ /dev/null @@ -1,212 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Regression; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Regression model = - BinaryData - .fromString( - "{\"taskType\":\"Regression\",\"primaryMetric\":\"NormalizedRootMeanSquaredError\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"ElasticNet\"],\"blockedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"ElasticNet\"],\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT84H43M30S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datavsi\",\"stackMetaLearnerTrainPercentage\":29.842412252567886,\"stackMetaLearnerType\":\"LightGBMRegressor\"}},\"cvSplitColumnNames\":[\"zydisnuep\",\"wyj\",\"nldpxottd\"],\"featurizationSettings\":{\"blockedTransformers\":[\"CountVectorizer\",\"WoETargetEncoder\"],\"columnNameAndTypes\":{\"vcjwqwoqsratj\":\"zjihweebiphr\",\"jhfrzgdkkagv\":\"dhzybsp\"},\"enableDnnFeaturization\":true,\"mode\":\"Custom\",\"transformerParams\":{\"mo\":[]},\"datasetLanguage\":\"mzhwilzzhni\"},\"limitSettings\":{\"enableEarlyTermination\":true,\"exitScore\":3.9502204468192637,\"maxConcurrentTrials\":2133816848,\"maxCoresPerTrial\":444992966,\"maxTrials\":1238035913,\"timeout\":\"PT160H46M45S\",\"trialTimeout\":\"PT11H57M31S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"bkut\",\"description\":\"mltwjfluxynbpvzl\"},\"testDataSize\":9.59052197916832,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"njc\",\"description\":\"mocgjshg\"},\"validationDataSize\":1.3885888922809064,\"weightColumnName\":\"wvixq\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"jkyb\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"clrvtzqnrbctbh\",\"description\":\"hxpcvrdnyeita\"}}") - .toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("jkyb", model.targetColumnName()); - Assertions.assertEquals("hxpcvrdnyeita", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("clrvtzqnrbctbh", model.trainingData().uri()); - Assertions.assertEquals(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT84H43M30S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 29.842412252567886D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals(RegressionModels.ELASTIC_NET, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals( - RegressionModels.EXTREME_RANDOM_TREES, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("zydisnuep", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mzhwilzzhni", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.COUNT_VECTORIZER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("zjihweebiphr", model.featurizationSettings().columnNameAndTypes().get("vcjwqwoqsratj")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(3.9502204468192637D, model.limitSettings().exitScore()); - Assertions.assertEquals(2133816848, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(444992966, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(1238035913, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT160H46M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT11H57M31S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("mltwjfluxynbpvzl", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals("bkut", model.testData().uri()); - Assertions.assertEquals(9.59052197916832D, model.testDataSize()); - Assertions.assertEquals("mocgjshg", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("njc", model.validationData().uri()); - Assertions.assertEquals(1.3885888922809064D, model.validationDataSize()); - Assertions.assertEquals("wvixq", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Regression model = - new Regression() - .withLogVerbosity(LogVerbosity.ERROR) - .withTargetColumnName("jkyb") - .withTrainingData( - new MLTableJobInput() - .withDescription("hxpcvrdnyeita") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("clrvtzqnrbctbh")) - .withPrimaryMetric(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR) - .withTrainingSettings( - new RegressionTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT84H43M30S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datavsi") - .withStackMetaLearnerTrainPercentage(29.842412252567886D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET)) - .withBlockedTrainingAlgorithms( - Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.ELASTIC_NET))) - .withCvSplitColumnNames(Arrays.asList("zydisnuep", "wyj", "nldpxottd")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("mzhwilzzhni") - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.COUNT_VECTORIZER, BlockedTransformers.WO_ETARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("vcjwqwoqsratj", "zjihweebiphr", "jhfrzgdkkagv", "dhzybsp")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.CUSTOM) - .withTransformerParams(mapOf("mo", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(true) - .withExitScore(3.9502204468192637D) - .withMaxConcurrentTrials(2133816848) - .withMaxCoresPerTrial(444992966) - .withMaxTrials(1238035913) - .withTimeout(Duration.parse("PT160H46M45S")) - .withTrialTimeout(Duration.parse("PT11H57M31S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("mltwjfluxynbpvzl") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("bkut")) - .withTestDataSize(9.59052197916832D) - .withValidationData( - new MLTableJobInput() - .withDescription("mocgjshg") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("njc")) - .withValidationDataSize(1.3885888922809064D) - .withWeightColumnName("wvixq"); - model = BinaryData.fromObject(model).toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("jkyb", model.targetColumnName()); - Assertions.assertEquals("hxpcvrdnyeita", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("clrvtzqnrbctbh", model.trainingData().uri()); - Assertions.assertEquals(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT84H43M30S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 29.842412252567886D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals(RegressionModels.ELASTIC_NET, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals( - RegressionModels.EXTREME_RANDOM_TREES, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("zydisnuep", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mzhwilzzhni", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.COUNT_VECTORIZER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("zjihweebiphr", model.featurizationSettings().columnNameAndTypes().get("vcjwqwoqsratj")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(3.9502204468192637D, model.limitSettings().exitScore()); - Assertions.assertEquals(2133816848, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(444992966, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(1238035913, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT160H46M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT11H57M31S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("mltwjfluxynbpvzl", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals("bkut", model.testData().uri()); - Assertions.assertEquals(9.59052197916832D, model.testDataSize()); - Assertions.assertEquals("mocgjshg", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("njc", model.validationData().uri()); - Assertions.assertEquals(1.3885888922809064D, model.validationDataSize()); - Assertions.assertEquals("wvixq", model.weightColumnName()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java deleted file mode 100644 index 272e375c9c596..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java +++ /dev/null @@ -1,69 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegressionTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"DecisionTree\"],\"enableDnnTraining\":true,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT173H34M23S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datakiceevsaaxwsp\",\"stackMetaLearnerTrainPercentage\":33.77569584333657,\"stackMetaLearnerType\":\"LightGBMRegressor\"}}") - .toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT173H34M23S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(33.77569584333657D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegressionTrainingSettings model = - new RegressionTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT173H34M23S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datakiceevsaaxwsp") - .withStackMetaLearnerTrainPercentage(33.77569584333657D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms(Arrays.asList(RegressionModels.DECISION_TREE)); - model = BinaryData.fromObject(model).toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT173H34M23S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(33.77569584333657D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java deleted file mode 100644 index 8057b8532d54c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java +++ /dev/null @@ -1,49 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceBase model = - BinaryData - .fromString( - "{\"description\":\"ss\",\"properties\":{\"uyowqkdwy\":\"twbdsrezpdrhn\"},\"tags\":{\"rcgp\":\"ib\",\"ejzanlfz\":\"kpzi\",\"zonokixrjqci\":\"iavrm\"}}") - .toObject(ResourceBase.class); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("twbdsrezpdrhn", model.properties().get("uyowqkdwy")); - Assertions.assertEquals("ib", model.tags().get("rcgp")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceBase model = - new ResourceBase() - .withDescription("ss") - .withProperties(mapOf("uyowqkdwy", "twbdsrezpdrhn")) - .withTags(mapOf("rcgp", "ib", "ejzanlfz", "kpzi", "zonokixrjqci", "iavrm")); - model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("twbdsrezpdrhn", model.properties().get("uyowqkdwy")); - Assertions.assertEquals("ib", model.tags().get("rcgp")); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java deleted file mode 100644 index c0c0860a0d4e1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java +++ /dev/null @@ -1,47 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceConfiguration model = - BinaryData - .fromString( - "{\"instanceCount\":1364369199,\"instanceType\":\"kgjubgdknnqvsazn\",\"properties\":{\"mkycgra\":\"dataorudsgsa\"}}") - .toObject(ResourceConfiguration.class); - Assertions.assertEquals(1364369199, model.instanceCount()); - Assertions.assertEquals("kgjubgdknnqvsazn", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceConfiguration model = - new ResourceConfiguration() - .withInstanceCount(1364369199) - .withInstanceType("kgjubgdknnqvsazn") - .withProperties(mapOf("mkycgra", "dataorudsgsa")); - model = BinaryData.fromObject(model).toObject(ResourceConfiguration.class); - Assertions.assertEquals(1364369199, model.instanceCount()); - Assertions.assertEquals("kgjubgdknnqvsazn", model.instanceType()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java deleted file mode 100644 index fbe206f907162..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceId model = BinaryData.fromString("{\"id\":\"gwgcl\"}").toObject(ResourceId.class); - Assertions.assertEquals("gwgcl", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("gwgcl"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("gwgcl", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java deleted file mode 100644 index 8a124e6a5b09d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceName; - -public final class ResourceNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceName model = - BinaryData - .fromString("{\"value\":\"yqzrnkcqvyxlw\",\"localizedValue\":\"lsicohoqqnwv\"}") - .toObject(ResourceName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceName model = new ResourceName(); - model = BinaryData.fromObject(model).toObject(ResourceName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java deleted file mode 100644 index 55f5b24d6e2e6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; - -public final class ResourceQuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceQuotaInner model = - BinaryData - .fromString( - "{\"id\":\"bkh\",\"amlWorkspaceLocation\":\"deyeamdphagalpbu\",\"type\":\"gipwhonowkg\",\"name\":{\"value\":\"ankixzbinjeput\",\"localizedValue\":\"rywn\"},\"limit\":4868014576917618697,\"unit\":\"Count\"}") - .toObject(ResourceQuotaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceQuotaInner model = new ResourceQuotaInner(); - model = BinaryData.fromObject(model).toObject(ResourceQuotaInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java deleted file mode 100644 index 89d8b35868a43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java +++ /dev/null @@ -1,26 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class RouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Route model = BinaryData.fromString("{\"path\":\"iykzkdncjdx\",\"port\":1933240221}").toObject(Route.class); - Assertions.assertEquals("iykzkdncjdx", model.path()); - Assertions.assertEquals(1933240221, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Route model = new Route().withPath("iykzkdncjdx").withPort(1933240221); - model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("iykzkdncjdx", model.path()); - Assertions.assertEquals(1933240221, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java deleted file mode 100644 index d126766fe08cb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java +++ /dev/null @@ -1,24 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm; - -public final class SamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SamplingAlgorithm model = - BinaryData - .fromString("{\"samplingAlgorithmType\":\"SamplingAlgorithm\"}") - .toObject(SamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SamplingAlgorithm model = new SamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(SamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java deleted file mode 100644 index 3dfb52853552c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettingsInformation model = - BinaryData - .fromString( - "{\"scaleSettings\":{\"maxNodeCount\":2089644825,\"minNodeCount\":582953019,\"nodeIdleTimeBeforeScaleDown\":\"PT83H47M42S\"}}") - .toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(2089644825, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(582953019, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT83H47M42S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettingsInformation model = - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(2089644825) - .withMinNodeCount(582953019) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT83H47M42S"))); - model = BinaryData.fromObject(model).toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(2089644825, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(582953019, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT83H47M42S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java deleted file mode 100644 index dc8082b7e78f1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettings model = - BinaryData - .fromString( - "{\"maxNodeCount\":978941807,\"minNodeCount\":1532421493,\"nodeIdleTimeBeforeScaleDown\":\"PT119H2M26S\"}") - .toObject(ScaleSettings.class); - Assertions.assertEquals(978941807, model.maxNodeCount()); - Assertions.assertEquals(1532421493, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT119H2M26S"), model.nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettings model = - new ScaleSettings() - .withMaxNodeCount(978941807) - .withMinNodeCount(1532421493) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT119H2M26S")); - model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(978941807, model.maxNodeCount()); - Assertions.assertEquals(1532421493, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT119H2M26S"), model.nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java deleted file mode 100644 index 025be761cf92f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; - -public final class ScheduleActionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleActionBase model = - BinaryData.fromString("{\"actionType\":\"ScheduleActionBase\"}").toObject(ScheduleActionBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleActionBase model = new ScheduleActionBase(); - model = BinaryData.fromObject(model).toObject(ScheduleActionBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java deleted file mode 100644 index 6b09e4895f95f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBase model = - BinaryData - .fromString("{\"id\":\"piudeugfsxzecpa\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}") - .toObject(ScheduleBase.class); - Assertions.assertEquals("piudeugfsxzecpa", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBase model = - new ScheduleBase() - .withId("piudeugfsxzecpa") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleBase.class); - Assertions.assertEquals("piudeugfsxzecpa", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java deleted file mode 100644 index 9351a842ad4ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"quvre\",\"isEnabled\":true,\"provisioningState\":\"Succeeded\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"vsujztczytqjtwh\",\"startTime\":\"unfprnjletlxs\",\"timeZone\":\"pddouifamowaziyn\"},\"description\":\"lqwzdvpiwhxqsz\",\"properties\":{\"m\":\"aajquhuxylrj\",\"kfkyjp\":\"ygjbmzyospspsh\",\"pssdfppyogtie\":\"sp\"},\"tags\":{\"munjdxvglnkvx\":\"tvczkcnyxr\",\"khpzvuqdflv\":\"xpaglqivbgkc\",\"xtiv\":\"niypfpubcpzg\",\"nidibgqjxg\":\"j\"}},\"id\":\"r\",\"name\":\"govfgpikqmhhaow\",\"type\":\"rmzvupo\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.properties().description()); - Assertions.assertEquals("aajquhuxylrj", model.properties().properties().get("m")); - Assertions.assertEquals("tvczkcnyxr", model.properties().tags().get("munjdxvglnkvx")); - Assertions.assertEquals("quvre", model.properties().displayName()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vsujztczytqjtwh", model.properties().trigger().endTime()); - Assertions.assertEquals("unfprnjletlxs", model.properties().trigger().startTime()); - Assertions.assertEquals("pddouifamowaziyn", model.properties().trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleInner model = - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("lqwzdvpiwhxqsz") - .withProperties(mapOf("m", "aajquhuxylrj", "kfkyjp", "ygjbmzyospspsh", "pssdfppyogtie", "sp")) - .withTags( - mapOf( - "munjdxvglnkvx", - "tvczkcnyxr", - "khpzvuqdflv", - "xpaglqivbgkc", - "xtiv", - "niypfpubcpzg", - "nidibgqjxg", - "j")) - .withAction(new ScheduleActionBase()) - .withDisplayName("quvre") - .withIsEnabled(true) - .withTrigger( - new TriggerBase() - .withEndTime("vsujztczytqjtwh") - .withStartTime("unfprnjletlxs") - .withTimeZone("pddouifamowaziyn"))); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.properties().description()); - Assertions.assertEquals("aajquhuxylrj", model.properties().properties().get("m")); - Assertions.assertEquals("tvczkcnyxr", model.properties().tags().get("munjdxvglnkvx")); - Assertions.assertEquals("quvre", model.properties().displayName()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vsujztczytqjtwh", model.properties().trigger().endTime()); - Assertions.assertEquals("unfprnjletlxs", model.properties().trigger().startTime()); - Assertions.assertEquals("pddouifamowaziyn", model.properties().trigger().timeZone()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java deleted file mode 100644 index bba0061655f32..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java +++ /dev/null @@ -1,66 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleProperties model = - BinaryData - .fromString( - "{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"zdfuydzvkfvxcnqm\",\"isEnabled\":false,\"provisioningState\":\"Creating\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"kmvkhl\",\"startTime\":\"dhbemzqkzszu\",\"timeZone\":\"wtglxx\"},\"description\":\"jfpgpicrmn\",\"properties\":{\"vpqcb\":\"gmqgjs\",\"s\":\"rmbodt\"},\"tags\":{\"xousxauzl\":\"vriibakclacjfr\",\"wohqfzizvu\":\"vsg\",\"vmribiat\":\"mmkjsvthnwpztek\"}}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals("jfpgpicrmn", model.description()); - Assertions.assertEquals("gmqgjs", model.properties().get("vpqcb")); - Assertions.assertEquals("vriibakclacjfr", model.tags().get("xousxauzl")); - Assertions.assertEquals("zdfuydzvkfvxcnqm", model.displayName()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("kmvkhl", model.trigger().endTime()); - Assertions.assertEquals("dhbemzqkzszu", model.trigger().startTime()); - Assertions.assertEquals("wtglxx", model.trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleProperties model = - new ScheduleProperties() - .withDescription("jfpgpicrmn") - .withProperties(mapOf("vpqcb", "gmqgjs", "s", "rmbodt")) - .withTags(mapOf("xousxauzl", "vriibakclacjfr", "wohqfzizvu", "vsg", "vmribiat", "mmkjsvthnwpztek")) - .withAction(new ScheduleActionBase()) - .withDisplayName("zdfuydzvkfvxcnqm") - .withIsEnabled(false) - .withTrigger( - new TriggerBase().withEndTime("kmvkhl").withStartTime("dhbemzqkzszu").withTimeZone("wtglxx")); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals("jfpgpicrmn", model.description()); - Assertions.assertEquals("gmqgjs", model.properties().get("vpqcb")); - Assertions.assertEquals("vriibakclacjfr", model.tags().get("xousxauzl")); - Assertions.assertEquals("zdfuydzvkfvxcnqm", model.displayName()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("kmvkhl", model.trigger().endTime()); - Assertions.assertEquals("dhbemzqkzszu", model.trigger().startTime()); - Assertions.assertEquals("wtglxx", model.trigger().timeZone()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java deleted file mode 100644 index 3c9894e04bbb2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"bmhyreeudz\",\"value\":[{\"properties\":{\"displayName\":\"pdqmjxlyyzglgouw\",\"isEnabled\":false,\"provisioningState\":\"Updating\",\"description\":\"uojqt\",\"properties\":{},\"tags\":{}},\"id\":\"kjeytunl\",\"name\":\"fjkwrusnkq\",\"type\":\"hsyrqunj\"},{\"properties\":{\"displayName\":\"denxau\",\"isEnabled\":true,\"provisioningState\":\"Creating\",\"description\":\"kifmjn\",\"properties\":{},\"tags\":{}},\"id\":\"qabpxuckpggqow\",\"name\":\"yirdhlisngwflqq\",\"type\":\"pizruwnpqxpxiw\"},{\"properties\":{\"displayName\":\"ngjsaasi\",\"isEnabled\":true,\"provisioningState\":\"Failed\",\"description\":\"jvkviirhgfgrws\",\"properties\":{},\"tags\":{}},\"id\":\"atzv\",\"name\":\"bglbyvict\",\"type\":\"tbrxkjz\"},{\"properties\":{\"displayName\":\"gxffmshkwf\",\"isEnabled\":false,\"provisioningState\":\"Creating\",\"description\":\"wopdbydpiz\",\"properties\":{},\"tags\":{}},\"id\":\"napxbiygnug\",\"name\":\"knfsmfcttuxuuyil\",\"type\":\"lq\"}]}") - .toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("bmhyreeudz", model.nextLink()); - Assertions.assertEquals("uojqt", model.value().get(0).properties().description()); - Assertions.assertEquals("pdqmjxlyyzglgouw", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleResourceArmPaginatedResult model = - new ScheduleResourceArmPaginatedResult() - .withNextLink("bmhyreeudz") - .withValue( - Arrays - .asList( - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("uojqt") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("pdqmjxlyyzglgouw") - .withIsEnabled(false)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("kifmjn") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("denxau") - .withIsEnabled(true)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("jvkviirhgfgrws") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("ngjsaasi") - .withIsEnabled(true)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("wopdbydpiz") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("gxffmshkwf") - .withIsEnabled(false)))); - model = BinaryData.fromObject(model).toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("bmhyreeudz", model.nextLink()); - Assertions.assertEquals("uojqt", model.value().get(0).properties().description()); - Assertions.assertEquals("pdqmjxlyyzglgouw", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index 4923d8a4a1d9b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,103 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -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 SchedulesCreateOrUpdateMockTests { - @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\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"j\",\"isEnabled\":false,\"provisioningState\":\"Succeeded\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"nxqpwnikxkcajgrb\",\"startTime\":\"tsvgoocqs\",\"timeZone\":\"mzlpcx\"},\"description\":\"mhxxrqicfzfvwjd\",\"properties\":{\"dkjrzfwkyluobdx\":\"vpyeyoafinmpnqu\",\"p\":\"hqdcclcvqsr\"},\"tags\":{\"fxl\":\"cvwbz\",\"iywqnpfydrfbgcny\":\"ymfjxl\",\"styygjq\":\"byxmkhmqyncgaull\"}},\"id\":\"lmwqg\",\"name\":\"hmqmiwxzf\",\"type\":\"vzucqfgufjnb\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .define("xaravwwuasnjeglh") - .withExistingWorkspace("zyq", "brnxhjtlxfikj") - .withProperties( - new ScheduleProperties() - .withDescription("fhjxsawo") - .withProperties(mapOf("qkmwzrdqyoybmrno", "ffhx", "qphkv", "ocjnzdaiovrbhr")) - .withTags(mapOf("yp", "adcrxyl", "iwhjdfrwpsshrmn", "tyzvelffohu", "ogkscxj", "cclpct")) - .withAction(new ScheduleActionBase()) - .withDisplayName("xbozpcjcnwjz") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("nw").withStartTime("svoqiza").withTimeZone("sdso"))) - .create(); - - Assertions.assertEquals("mhxxrqicfzfvwjd", response.properties().description()); - Assertions.assertEquals("vpyeyoafinmpnqu", response.properties().properties().get("dkjrzfwkyluobdx")); - Assertions.assertEquals("cvwbz", response.properties().tags().get("fxl")); - Assertions.assertEquals("j", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("nxqpwnikxkcajgrb", response.properties().trigger().endTime()); - Assertions.assertEquals("tsvgoocqs", response.properties().trigger().startTime()); - Assertions.assertEquals("mzlpcx", response.properties().trigger().timeZone()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java deleted file mode 100644 index 830834e918e31..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 SchedulesDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.schedules().delete("yuveoxmpz", "wahdrdvhaztkxbi", "zfgxmbry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java deleted file mode 100644 index bd976d8ce7f14..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -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 SchedulesGetWithResponseMockTests { - @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\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"qwdr\",\"isEnabled\":true,\"provisioningState\":\"Canceled\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"glmrcokzze\",\"startTime\":\"kounzsiy\",\"timeZone\":\"uby\"},\"description\":\"popikzeb\",\"properties\":{\"czygpmgfjcu\":\"fywtkqowsdlk\",\"otuzbybwjmtftc\":\"ojhhylxdevfiyy\"},\"tags\":{\"aqpibjg\":\"nirupkqnst\",\"bmsennqfabqcama\":\"vswmehfxrtt\"}},\"id\":\"ctcxs\",\"name\":\"mbzdxmsyn\",\"type\":\"kdnnyufxuzms\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager.schedules().getWithResponse("mw", "bios", "qsykq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("popikzeb", response.properties().description()); - Assertions.assertEquals("fywtkqowsdlk", response.properties().properties().get("czygpmgfjcu")); - Assertions.assertEquals("nirupkqnst", response.properties().tags().get("aqpibjg")); - Assertions.assertEquals("qwdr", response.properties().displayName()); - Assertions.assertEquals(true, response.properties().isEnabled()); - Assertions.assertEquals("glmrcokzze", response.properties().trigger().endTime()); - Assertions.assertEquals("kounzsiy", response.properties().trigger().startTime()); - Assertions.assertEquals("uby", response.properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java deleted file mode 100644 index 4d28e762a5387..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -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 SchedulesListMockTests { - @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\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"ygnbknhjgclxaxwc\",\"isEnabled\":false,\"provisioningState\":\"Failed\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"dzkucszghdoaqip\",\"startTime\":\"xclfrs\",\"timeZone\":\"rnmuvwvpuofddtbf\"},\"description\":\"kjcnginxdvmaoyq\",\"properties\":{\"txoqxtdn\":\"gyxzmxynofxl\"},\"tags\":{\"nivdqtkyk\":\"sjirkrpskcjhmmof\"}},\"id\":\"xnlsf\",\"name\":\"nyscaccpt\",\"type\":\"zetxygxxiceecvj\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .schedules() - .list("jezbfsjwfczgl", "vbgukbs", "bw", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kjcnginxdvmaoyq", response.iterator().next().properties().description()); - Assertions.assertEquals("gyxzmxynofxl", response.iterator().next().properties().properties().get("txoqxtdn")); - Assertions.assertEquals("sjirkrpskcjhmmof", response.iterator().next().properties().tags().get("nivdqtkyk")); - Assertions.assertEquals("ygnbknhjgclxaxwc", response.iterator().next().properties().displayName()); - Assertions.assertEquals(false, response.iterator().next().properties().isEnabled()); - Assertions.assertEquals("dzkucszghdoaqip", response.iterator().next().properties().trigger().endTime()); - Assertions.assertEquals("xclfrs", response.iterator().next().properties().trigger().startTime()); - Assertions.assertEquals("rnmuvwvpuofddtbf", response.iterator().next().properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java deleted file mode 100644 index 6146bafa97fcf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java +++ /dev/null @@ -1,39 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import org.junit.jupiter.api.Assertions; - -public final class ScriptReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptReference model = - BinaryData - .fromString( - "{\"scriptSource\":\"z\",\"scriptData\":\"blkujrllfojuidjp\",\"scriptArguments\":\"yjucejikzoeo\",\"timeout\":\"tzejetjklnt\"}") - .toObject(ScriptReference.class); - Assertions.assertEquals("z", model.scriptSource()); - Assertions.assertEquals("blkujrllfojuidjp", model.scriptData()); - Assertions.assertEquals("yjucejikzoeo", model.scriptArguments()); - Assertions.assertEquals("tzejetjklnt", model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptReference model = - new ScriptReference() - .withScriptSource("z") - .withScriptData("blkujrllfojuidjp") - .withScriptArguments("yjucejikzoeo") - .withTimeout("tzejetjklnt"); - model = BinaryData.fromObject(model).toObject(ScriptReference.class); - Assertions.assertEquals("z", model.scriptSource()); - Assertions.assertEquals("blkujrllfojuidjp", model.scriptData()); - Assertions.assertEquals("yjucejikzoeo", model.scriptArguments()); - Assertions.assertEquals("tzejetjklnt", model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java deleted file mode 100644 index 73a18add9a8a3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java +++ /dev/null @@ -1,56 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import org.junit.jupiter.api.Assertions; - -public final class ScriptsToExecuteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptsToExecute model = - BinaryData - .fromString( - "{\"startupScript\":{\"scriptSource\":\"rvkmjcwmjvlgfggc\",\"scriptData\":\"yylizrz\",\"scriptArguments\":\"psfxsf\",\"timeout\":\"tl\"},\"creationScript\":{\"scriptSource\":\"vagbwidqlvhukove\",\"scriptData\":\"i\",\"scriptArguments\":\"vjfn\",\"timeout\":\"mvl\"}}") - .toObject(ScriptsToExecute.class); - Assertions.assertEquals("rvkmjcwmjvlgfggc", model.startupScript().scriptSource()); - Assertions.assertEquals("yylizrz", model.startupScript().scriptData()); - Assertions.assertEquals("psfxsf", model.startupScript().scriptArguments()); - Assertions.assertEquals("tl", model.startupScript().timeout()); - Assertions.assertEquals("vagbwidqlvhukove", model.creationScript().scriptSource()); - Assertions.assertEquals("i", model.creationScript().scriptData()); - Assertions.assertEquals("vjfn", model.creationScript().scriptArguments()); - Assertions.assertEquals("mvl", model.creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptsToExecute model = - new ScriptsToExecute() - .withStartupScript( - new ScriptReference() - .withScriptSource("rvkmjcwmjvlgfggc") - .withScriptData("yylizrz") - .withScriptArguments("psfxsf") - .withTimeout("tl")) - .withCreationScript( - new ScriptReference() - .withScriptSource("vagbwidqlvhukove") - .withScriptData("i") - .withScriptArguments("vjfn") - .withTimeout("mvl")); - model = BinaryData.fromObject(model).toObject(ScriptsToExecute.class); - Assertions.assertEquals("rvkmjcwmjvlgfggc", model.startupScript().scriptSource()); - Assertions.assertEquals("yylizrz", model.startupScript().scriptData()); - Assertions.assertEquals("psfxsf", model.startupScript().scriptArguments()); - Assertions.assertEquals("tl", model.startupScript().timeout()); - Assertions.assertEquals("vagbwidqlvhukove", model.creationScript().scriptSource()); - Assertions.assertEquals("i", model.creationScript().scriptData()); - Assertions.assertEquals("vjfn", model.creationScript().scriptArguments()); - Assertions.assertEquals("mvl", model.creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java deleted file mode 100644 index 93d8e50a1bf87..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Seasonality; - -public final class SeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Seasonality model = BinaryData.fromString("{\"mode\":\"Seasonality\"}").toObject(Seasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Seasonality model = new Seasonality(); - model = BinaryData.fromObject(model).toObject(Seasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java deleted file mode 100644 index a89f03acf4af5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import org.junit.jupiter.api.Assertions; - -public final class ServiceManagedResourcesSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceManagedResourcesSettings model = - BinaryData - .fromString("{\"cosmosDb\":{\"collectionsThroughput\":775754231}}") - .toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedResourcesSettings model = - new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(775754231)); - model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java deleted file mode 100644 index 1cf13f62bed67..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import com.azure.resourcemanager.machinelearning.models.SetupScripts; -import org.junit.jupiter.api.Assertions; - -public final class SetupScriptsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SetupScripts model = - BinaryData - .fromString( - "{\"scripts\":{\"startupScript\":{\"scriptSource\":\"otjewlpxuzzjgnre\",\"scriptData\":\"yhqotoihiqakydi\",\"scriptArguments\":\"brkwpzdqt\",\"timeout\":\"cspodaqax\"},\"creationScript\":{\"scriptSource\":\"ietgbebjfu\",\"scriptData\":\"moichdlpnfpubntn\",\"scriptArguments\":\"tzviqsowsaaelcat\",\"timeout\":\"ju\"}}}") - .toObject(SetupScripts.class); - Assertions.assertEquals("otjewlpxuzzjgnre", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("yhqotoihiqakydi", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("brkwpzdqt", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("cspodaqax", model.scripts().startupScript().timeout()); - Assertions.assertEquals("ietgbebjfu", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("moichdlpnfpubntn", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("tzviqsowsaaelcat", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("ju", model.scripts().creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SetupScripts model = - new SetupScripts() - .withScripts( - new ScriptsToExecute() - .withStartupScript( - new ScriptReference() - .withScriptSource("otjewlpxuzzjgnre") - .withScriptData("yhqotoihiqakydi") - .withScriptArguments("brkwpzdqt") - .withTimeout("cspodaqax")) - .withCreationScript( - new ScriptReference() - .withScriptSource("ietgbebjfu") - .withScriptData("moichdlpnfpubntn") - .withScriptArguments("tzviqsowsaaelcat") - .withTimeout("ju"))); - model = BinaryData.fromObject(model).toObject(SetupScripts.class); - Assertions.assertEquals("otjewlpxuzzjgnre", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("yhqotoihiqakydi", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("brkwpzdqt", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("cspodaqax", model.scripts().startupScript().timeout()); - Assertions.assertEquals("ietgbebjfu", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("moichdlpnfpubntn", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("tzviqsowsaaelcat", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("ju", model.scripts().creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java deleted file mode 100644 index 42cf41eef25f4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourcePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceProperty model = - BinaryData - .fromString( - "{\"privateLinkResourceId\":\"s\",\"groupId\":\"smjqulngsntnbyb\",\"requestMessage\":\"gc\",\"status\":\"Approved\"}") - .toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("s", model.privateLinkResourceId()); - Assertions.assertEquals("smjqulngsntnbyb", model.groupId()); - Assertions.assertEquals("gc", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperty model = - new SharedPrivateLinkResourceProperty() - .withPrivateLinkResourceId("s") - .withGroupId("smjqulngsntnbyb") - .withRequestMessage("gc") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("s", model.privateLinkResourceId()); - Assertions.assertEquals("smjqulngsntnbyb", model.groupId()); - Assertions.assertEquals("gc", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java deleted file mode 100644 index 30813b7dfc771..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResource model = - BinaryData - .fromString( - "{\"name\":\"bwjzr\",\"properties\":{\"privateLinkResourceId\":\"gxg\",\"groupId\":\"pemvtzfkufubljof\",\"requestMessage\":\"eofjaeqjh\",\"status\":\"Pending\"}}") - .toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("bwjzr", model.name()); - Assertions.assertEquals("gxg", model.privateLinkResourceId()); - Assertions.assertEquals("pemvtzfkufubljof", model.groupId()); - Assertions.assertEquals("eofjaeqjh", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResource model = - new SharedPrivateLinkResource() - .withName("bwjzr") - .withPrivateLinkResourceId("gxg") - .withGroupId("pemvtzfkufubljof") - .withRequestMessage("eofjaeqjh") - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("bwjzr", model.name()); - Assertions.assertEquals("gxg", model.privateLinkResourceId()); - Assertions.assertEquals("pemvtzfkufubljof", model.groupId()); - Assertions.assertEquals("eofjaeqjh", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java deleted file mode 100644 index 28a064043258c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import org.junit.jupiter.api.Assertions; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = - BinaryData - .fromString( - "{\"default\":179999920,\"maximum\":2087309055,\"minimum\":498585791,\"scaleType\":\"Automatic\"}") - .toObject(SkuCapacity.class); - Assertions.assertEquals(179999920, model.defaultProperty()); - Assertions.assertEquals(2087309055, model.maximum()); - Assertions.assertEquals(498585791, model.minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = - new SkuCapacity() - .withDefaultProperty(179999920) - .withMaximum(2087309055) - .withMinimum(498585791) - .withScaleType(SkuScaleType.AUTOMATIC); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(179999920, model.defaultProperty()); - Assertions.assertEquals(2087309055, model.maximum()); - Assertions.assertEquals(498585791, model.minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java deleted file mode 100644 index 66d1afb25b4f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"rmcaykgg\",\"value\":[{\"capacity\":{\"default\":167940342,\"maximum\":1720310055,\"minimum\":150393165,\"scaleType\":\"Manual\"},\"resourceType\":\"d\",\"sku\":{\"name\":\"pfnznthjtwkj\",\"tier\":\"Standard\"}}]}") - .toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("rmcaykgg", model.nextLink()); - Assertions.assertEquals(167940342, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(1720310055, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(150393165, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArmPaginatedResult model = - new SkuResourceArmPaginatedResult() - .withNextLink("rmcaykgg") - .withValue( - Arrays - .asList( - new SkuResourceInner() - .withCapacity( - new SkuCapacity() - .withDefaultProperty(167940342) - .withMaximum(1720310055) - .withMinimum(150393165) - .withScaleType(SkuScaleType.MANUAL)) - .withSku(new SkuSetting().withName("pfnznthjtwkj").withTier(SkuTier.STANDARD)))); - model = BinaryData.fromObject(model).toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("rmcaykgg", model.nextLink()); - Assertions.assertEquals(167940342, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(1720310055, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(150393165, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java deleted file mode 100644 index c49c4c71bae58..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java +++ /dev/null @@ -1,50 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceInner model = - BinaryData - .fromString( - "{\"capacity\":{\"default\":1475743122,\"maximum\":1335142199,\"minimum\":1634012333,\"scaleType\":\"Manual\"},\"resourceType\":\"cqiosmgbza\",\"sku\":{\"name\":\"xqdlyrtltlapr\",\"tier\":\"Basic\"}}") - .toObject(SkuResourceInner.class); - Assertions.assertEquals(1475743122, model.capacity().defaultProperty()); - Assertions.assertEquals(1335142199, model.capacity().maximum()); - Assertions.assertEquals(1634012333, model.capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals("xqdlyrtltlapr", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model = - new SkuResourceInner() - .withCapacity( - new SkuCapacity() - .withDefaultProperty(1475743122) - .withMaximum(1335142199) - .withMinimum(1634012333) - .withScaleType(SkuScaleType.MANUAL)) - .withSku(new SkuSetting().withName("xqdlyrtltlapr").withTier(SkuTier.BASIC)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals(1475743122, model.capacity().defaultProperty()); - Assertions.assertEquals(1335142199, model.capacity().maximum()); - Assertions.assertEquals(1634012333, model.capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals("xqdlyrtltlapr", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java deleted file mode 100644 index 069d89339005d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuSetting model = - BinaryData.fromString("{\"name\":\"nnbsoqeqa\",\"tier\":\"Premium\"}").toObject(SkuSetting.class); - Assertions.assertEquals("nnbsoqeqa", model.name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model = new SkuSetting().withName("nnbsoqeqa").withTier(SkuTier.PREMIUM); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("nnbsoqeqa", model.name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java deleted file mode 100644 index 5f25125dfac70..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java +++ /dev/null @@ -1,43 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"name\":\"narxzxtheotus\",\"tier\":\"Free\",\"size\":\"v\",\"family\":\"iqihn\",\"capacity\":1574404612}") - .toObject(Sku.class); - Assertions.assertEquals("narxzxtheotus", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("v", model.size()); - Assertions.assertEquals("iqihn", model.family()); - Assertions.assertEquals(1574404612, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = - new Sku() - .withName("narxzxtheotus") - .withTier(SkuTier.FREE) - .withSize("v") - .withFamily("iqihn") - .withCapacity(1574404612); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("narxzxtheotus", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("v", model.size()); - Assertions.assertEquals("iqihn", model.family()); - Assertions.assertEquals(1574404612, model.capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java deleted file mode 100644 index 3a87f545b8ce1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java +++ /dev/null @@ -1,35 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import org.junit.jupiter.api.Assertions; - -public final class StackEnsembleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StackEnsembleSettings model = - BinaryData - .fromString( - "{\"stackMetaLearnerKWargs\":\"datandlqvtwknvgmmbu\",\"stackMetaLearnerTrainPercentage\":7.642157888085865,\"stackMetaLearnerType\":\"LogisticRegression\"}") - .toObject(StackEnsembleSettings.class); - Assertions.assertEquals(7.642157888085865D, model.stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackMetaLearnerType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StackEnsembleSettings model = - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datandlqvtwknvgmmbu") - .withStackMetaLearnerTrainPercentage(7.642157888085865D) - .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION); - model = BinaryData.fromObject(model).toObject(StackEnsembleSettings.class); - Assertions.assertEquals(7.642157888085865D, model.stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackMetaLearnerType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java deleted file mode 100644 index b1cd5557ce140..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class SweepJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SweepJobLimits model = - BinaryData - .fromString( - "{\"jobLimitsType\":\"Sweep\",\"maxConcurrentTrials\":1289892692,\"maxTotalTrials\":1229317362,\"trialTimeout\":\"PT17H24M34S\",\"timeout\":\"PT94H24M1S\"}") - .toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT94H24M1S"), model.timeout()); - Assertions.assertEquals(1289892692, model.maxConcurrentTrials()); - Assertions.assertEquals(1229317362, model.maxTotalTrials()); - Assertions.assertEquals(Duration.parse("PT17H24M34S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SweepJobLimits model = - new SweepJobLimits() - .withTimeout(Duration.parse("PT94H24M1S")) - .withMaxConcurrentTrials(1289892692) - .withMaxTotalTrials(1229317362) - .withTrialTimeout(Duration.parse("PT17H24M34S")); - model = BinaryData.fromObject(model).toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT94H24M1S"), model.timeout()); - Assertions.assertEquals(1289892692, model.maxConcurrentTrials()); - Assertions.assertEquals(1229317362, model.maxTotalTrials()); - Assertions.assertEquals(Duration.parse("PT17H24M34S"), model.trialTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java deleted file mode 100644 index ac5066baa849e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java +++ /dev/null @@ -1,69 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties; -import org.junit.jupiter.api.Assertions; - -public final class SynapseSparkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SynapseSparkProperties model = - BinaryData - .fromString( - "{\"autoScaleProperties\":{\"minNodeCount\":1954145446,\"enabled\":true,\"maxNodeCount\":1674537674},\"autoPauseProperties\":{\"delayInMinutes\":1052407004,\"enabled\":true},\"sparkVersion\":\"ojpslsvjgpliufi\",\"nodeCount\":1125182676,\"nodeSize\":\"xqvapcohh\",\"nodeSizeFamily\":\"cqpqojxcxzrzdc\",\"subscriptionId\":\"zbenribc\",\"resourceGroup\":\"etzqd\",\"workspaceName\":\"jwfljhznamtua\",\"poolName\":\"zwcjjncqtj\"}") - .toObject(SynapseSparkProperties.class); - Assertions.assertEquals(1954145446, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1674537674, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1052407004, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.autoPauseProperties().enabled()); - Assertions.assertEquals("ojpslsvjgpliufi", model.sparkVersion()); - Assertions.assertEquals(1125182676, model.nodeCount()); - Assertions.assertEquals("xqvapcohh", model.nodeSize()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.nodeSizeFamily()); - Assertions.assertEquals("zbenribc", model.subscriptionId()); - Assertions.assertEquals("etzqd", model.resourceGroup()); - Assertions.assertEquals("jwfljhznamtua", model.workspaceName()); - Assertions.assertEquals("zwcjjncqtj", model.poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSparkProperties model = - new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties() - .withMinNodeCount(1954145446) - .withEnabled(true) - .withMaxNodeCount(1674537674)) - .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1052407004).withEnabled(true)) - .withSparkVersion("ojpslsvjgpliufi") - .withNodeCount(1125182676) - .withNodeSize("xqvapcohh") - .withNodeSizeFamily("cqpqojxcxzrzdc") - .withSubscriptionId("zbenribc") - .withResourceGroup("etzqd") - .withWorkspaceName("jwfljhznamtua") - .withPoolName("zwcjjncqtj"); - model = BinaryData.fromObject(model).toObject(SynapseSparkProperties.class); - Assertions.assertEquals(1954145446, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1674537674, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1052407004, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.autoPauseProperties().enabled()); - Assertions.assertEquals("ojpslsvjgpliufi", model.sparkVersion()); - Assertions.assertEquals(1125182676, model.nodeCount()); - Assertions.assertEquals("xqvapcohh", model.nodeSize()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.nodeSizeFamily()); - Assertions.assertEquals("zbenribc", model.subscriptionId()); - Assertions.assertEquals("etzqd", model.resourceGroup()); - Assertions.assertEquals("jwfljhznamtua", model.workspaceName()); - Assertions.assertEquals("zwcjjncqtj", model.poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java deleted file mode 100644 index 35050793a9b8d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import com.azure.resourcemanager.machinelearning.models.SynapseSpark; -import com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties; -import org.junit.jupiter.api.Assertions; - -public final class SynapseSparkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SynapseSpark model = - BinaryData - .fromString( - "{\"computeType\":\"SynapseSpark\",\"properties\":{\"autoScaleProperties\":{\"minNodeCount\":1214736566,\"enabled\":false,\"maxNodeCount\":576028683},\"autoPauseProperties\":{\"delayInMinutes\":909175637,\"enabled\":true},\"sparkVersion\":\"pedbwdpyqy\",\"nodeCount\":895891546,\"nodeSize\":\"bmdnafcbqwre\",\"nodeSizeFamily\":\"ela\",\"subscriptionId\":\"cigeleohdbvqvw\",\"resourceGroup\":\"jopwbeonrlkwz\",\"workspaceName\":\"ybxc\",\"poolName\":\"kxcpt\"},\"computeLocation\":\"qfyiaseqchkr\",\"provisioningState\":\"Canceled\",\"description\":\"azisgyk\",\"createdOn\":\"2021-05-23T19:22:14Z\",\"modifiedOn\":\"2021-11-23T05:48:50Z\",\"resourceId\":\"nbwzohmnrxxbso\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}") - .toObject(SynapseSpark.class); - Assertions.assertEquals("qfyiaseqchkr", model.computeLocation()); - Assertions.assertEquals("azisgyk", model.description()); - Assertions.assertEquals("nbwzohmnrxxbso", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(1214736566, model.properties().autoScaleProperties().minNodeCount()); - Assertions.assertEquals(false, model.properties().autoScaleProperties().enabled()); - Assertions.assertEquals(576028683, model.properties().autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(909175637, model.properties().autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.properties().autoPauseProperties().enabled()); - Assertions.assertEquals("pedbwdpyqy", model.properties().sparkVersion()); - Assertions.assertEquals(895891546, model.properties().nodeCount()); - Assertions.assertEquals("bmdnafcbqwre", model.properties().nodeSize()); - Assertions.assertEquals("ela", model.properties().nodeSizeFamily()); - Assertions.assertEquals("cigeleohdbvqvw", model.properties().subscriptionId()); - Assertions.assertEquals("jopwbeonrlkwz", model.properties().resourceGroup()); - Assertions.assertEquals("ybxc", model.properties().workspaceName()); - Assertions.assertEquals("kxcpt", model.properties().poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSpark model = - new SynapseSpark() - .withComputeLocation("qfyiaseqchkr") - .withDescription("azisgyk") - .withResourceId("nbwzohmnrxxbso") - .withDisableLocalAuth(false) - .withProperties( - new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties() - .withMinNodeCount(1214736566) - .withEnabled(false) - .withMaxNodeCount(576028683)) - .withAutoPauseProperties( - new AutoPauseProperties().withDelayInMinutes(909175637).withEnabled(true)) - .withSparkVersion("pedbwdpyqy") - .withNodeCount(895891546) - .withNodeSize("bmdnafcbqwre") - .withNodeSizeFamily("ela") - .withSubscriptionId("cigeleohdbvqvw") - .withResourceGroup("jopwbeonrlkwz") - .withWorkspaceName("ybxc") - .withPoolName("kxcpt")); - model = BinaryData.fromObject(model).toObject(SynapseSpark.class); - Assertions.assertEquals("qfyiaseqchkr", model.computeLocation()); - Assertions.assertEquals("azisgyk", model.description()); - Assertions.assertEquals("nbwzohmnrxxbso", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(1214736566, model.properties().autoScaleProperties().minNodeCount()); - Assertions.assertEquals(false, model.properties().autoScaleProperties().enabled()); - Assertions.assertEquals(576028683, model.properties().autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(909175637, model.properties().autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.properties().autoPauseProperties().enabled()); - Assertions.assertEquals("pedbwdpyqy", model.properties().sparkVersion()); - Assertions.assertEquals(895891546, model.properties().nodeCount()); - Assertions.assertEquals("bmdnafcbqwre", model.properties().nodeSize()); - Assertions.assertEquals("ela", model.properties().nodeSizeFamily()); - Assertions.assertEquals("cigeleohdbvqvw", model.properties().subscriptionId()); - Assertions.assertEquals("jopwbeonrlkwz", model.properties().resourceGroup()); - Assertions.assertEquals("ybxc", model.properties().workspaceName()); - Assertions.assertEquals("kxcpt", model.properties().poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java deleted file mode 100644 index 0680a3ac90f13..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SystemService; - -public final class SystemServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemService model = - BinaryData - .fromString( - "{\"systemServiceType\":\"gcgbjb\",\"publicIpAddress\":\"lfgtdysnaquflqbc\",\"version\":\"hamzjrwdkqze\"}") - .toObject(SystemService.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemService model = new SystemService(); - model = BinaryData.fromObject(model).toObject(SystemService.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java deleted file mode 100644 index bd094cd3e34b7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java +++ /dev/null @@ -1,69 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalFeaturizationSettings model = - BinaryData - .fromString( - "{\"blockedTransformers\":[\"TextTargetEncoder\"],\"columnNameAndTypes\":{\"qyv\":\"blhtjq\",\"a\":\"eh\"},\"enableDnnFeaturization\":false,\"mode\":\"Auto\",\"transformerParams\":{\"tjvv\":[{\"fields\":[\"usxivzrrryvei\",\"ipsk\"],\"parameters\":\"datazatvfuzka\"}]},\"datasetLanguage\":\"xwigsye\"}") - .toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("xwigsye", model.datasetLanguage()); - Assertions.assertEquals(BlockedTransformers.TEXT_TARGET_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("blhtjq", model.columnNameAndTypes().get("qyv")); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.mode()); - Assertions.assertEquals("usxivzrrryvei", model.transformerParams().get("tjvv").get(0).fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalFeaturizationSettings model = - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("xwigsye") - .withBlockedTransformers(Arrays.asList(BlockedTransformers.TEXT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("qyv", "blhtjq", "a", "eh")) - .withEnableDnnFeaturization(false) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams( - mapOf( - "tjvv", - Arrays - .asList( - new ColumnTransformer() - .withFields(Arrays.asList("usxivzrrryvei", "ipsk")) - .withParameters("datazatvfuzka")))); - model = BinaryData.fromObject(model).toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("xwigsye", model.datasetLanguage()); - Assertions.assertEquals(BlockedTransformers.TEXT_TARGET_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("blhtjq", model.columnNameAndTypes().get("qyv")); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.mode()); - Assertions.assertEquals("usxivzrrryvei", model.transformerParams().get("tjvv").get(0).fields().get(0)); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java deleted file mode 100644 index e6eec1743952d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java +++ /dev/null @@ -1,49 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalLimitSettings model = - BinaryData - .fromString( - "{\"enableEarlyTermination\":false,\"exitScore\":93.94093189506944,\"maxConcurrentTrials\":976047571,\"maxCoresPerTrial\":1086162181,\"maxTrials\":943881137,\"timeout\":\"PT74H46M4S\",\"trialTimeout\":\"PT5H4M5S\"}") - .toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(false, model.enableEarlyTermination()); - Assertions.assertEquals(93.94093189506944D, model.exitScore()); - Assertions.assertEquals(976047571, model.maxConcurrentTrials()); - Assertions.assertEquals(1086162181, model.maxCoresPerTrial()); - Assertions.assertEquals(943881137, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT74H46M4S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT5H4M5S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalLimitSettings model = - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(93.94093189506944D) - .withMaxConcurrentTrials(976047571) - .withMaxCoresPerTrial(1086162181) - .withMaxTrials(943881137) - .withTimeout(Duration.parse("PT74H46M4S")) - .withTrialTimeout(Duration.parse("PT5H4M5S")); - model = BinaryData.fromObject(model).toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(false, model.enableEarlyTermination()); - Assertions.assertEquals(93.94093189506944D, model.exitScore()); - Assertions.assertEquals(976047571, model.maxConcurrentTrials()); - Assertions.assertEquals(1086162181, model.maxCoresPerTrial()); - Assertions.assertEquals(943881137, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT74H46M4S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT5H4M5S"), model.trialTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java deleted file mode 100644 index a45b8e331985c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java +++ /dev/null @@ -1,132 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.TableVertical; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVertical model = - BinaryData - .fromString( - "{\"cvSplitColumnNames\":[\"aqkue\",\"tgroesh\"],\"featurizationSettings\":{\"blockedTransformers\":[\"LabelEncoder\",\"CountVectorizer\"],\"columnNameAndTypes\":{\"vjmvqmtdwckygr\":\"qxkfaoytehqp\",\"kb\":\"ejnndljdju\",\"n\":\"req\"},\"enableDnnFeaturization\":true,\"mode\":\"Auto\",\"transformerParams\":{\"egplwr\":[]},\"datasetLanguage\":\"hwddkvbxgkq\"},\"limitSettings\":{\"enableEarlyTermination\":true,\"exitScore\":58.74936526740298,\"maxConcurrentTrials\":1893356146,\"maxCoresPerTrial\":1883292844,\"maxTrials\":501930478,\"timeout\":\"PT193H51M55S\",\"trialTimeout\":\"PT46H37M35S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"poi\",\"description\":\"naz\"},\"testDataSize\":59.15029219925634,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"qalsxkd\",\"description\":\"qapfgsdpc\"},\"validationDataSize\":60.92552835591164,\"weightColumnName\":\"zhhkuuipldqqc\"}") - .toObject(TableVertical.class); - Assertions.assertEquals("aqkue", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hwddkvbxgkq", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.LABEL_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("qxkfaoytehqp", model.featurizationSettings().columnNameAndTypes().get("vjmvqmtdwckygr")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(58.74936526740298D, model.limitSettings().exitScore()); - Assertions.assertEquals(1893356146, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1883292844, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(501930478, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51M55S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT46H37M35S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("naz", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("poi", model.testData().uri()); - Assertions.assertEquals(59.15029219925634D, model.testDataSize()); - Assertions.assertEquals("qapfgsdpc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("qalsxkd", model.validationData().uri()); - Assertions.assertEquals(60.92552835591164D, model.validationDataSize()); - Assertions.assertEquals("zhhkuuipldqqc", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVertical model = - new TableVertical() - .withCvSplitColumnNames(Arrays.asList("aqkue", "tgroesh")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("hwddkvbxgkq") - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.LABEL_ENCODER, BlockedTransformers.COUNT_VECTORIZER)) - .withColumnNameAndTypes(mapOf("vjmvqmtdwckygr", "qxkfaoytehqp", "kb", "ejnndljdju", "n", "req")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams(mapOf("egplwr", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(true) - .withExitScore(58.74936526740298D) - .withMaxConcurrentTrials(1893356146) - .withMaxCoresPerTrial(1883292844) - .withMaxTrials(501930478) - .withTimeout(Duration.parse("PT193H51M55S")) - .withTrialTimeout(Duration.parse("PT46H37M35S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("naz") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("poi")) - .withTestDataSize(59.15029219925634D) - .withValidationData( - new MLTableJobInput() - .withDescription("qapfgsdpc") - .withMode(InputDeliveryMode.DIRECT) - .withUri("qalsxkd")) - .withValidationDataSize(60.92552835591164D) - .withWeightColumnName("zhhkuuipldqqc"); - model = BinaryData.fromObject(model).toObject(TableVertical.class); - Assertions.assertEquals("aqkue", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hwddkvbxgkq", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.LABEL_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("qxkfaoytehqp", model.featurizationSettings().columnNameAndTypes().get("vjmvqmtdwckygr")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(58.74936526740298D, model.limitSettings().exitScore()); - Assertions.assertEquals(1893356146, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1883292844, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(501930478, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51M55S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT46H37M35S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("naz", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("poi", model.testData().uri()); - Assertions.assertEquals(59.15029219925634D, model.testDataSize()); - Assertions.assertEquals("qapfgsdpc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("qalsxkd", model.validationData().uri()); - Assertions.assertEquals(60.92552835591164D, model.validationDataSize()); - Assertions.assertEquals("zhhkuuipldqqc", model.weightColumnName()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java deleted file mode 100644 index 529ec59a2e017..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetLags; - -public final class TargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetLags model = BinaryData.fromString("{\"mode\":\"TargetLags\"}").toObject(TargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetLags model = new TargetLags(); - model = BinaryData.fromObject(model).toObject(TargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java deleted file mode 100644 index c8c6218362872..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; - -public final class TargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetRollingWindowSize model = - BinaryData.fromString("{\"mode\":\"TargetRollingWindowSize\"}").toObject(TargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetRollingWindowSize model = new TargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(TargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java deleted file mode 100644 index 078f8865a89f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TargetUtilizationScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetUtilizationScaleSettings model = - BinaryData - .fromString( - "{\"scaleType\":\"TargetUtilization\",\"maxInstances\":1095681099,\"minInstances\":1317358877,\"pollingInterval\":\"PT10H14M39S\",\"targetUtilizationPercentage\":93995844}") - .toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(1095681099, model.maxInstances()); - Assertions.assertEquals(1317358877, model.minInstances()); - Assertions.assertEquals(Duration.parse("PT10H14M39S"), model.pollingInterval()); - Assertions.assertEquals(93995844, model.targetUtilizationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetUtilizationScaleSettings model = - new TargetUtilizationScaleSettings() - .withMaxInstances(1095681099) - .withMinInstances(1317358877) - .withPollingInterval(Duration.parse("PT10H14M39S")) - .withTargetUtilizationPercentage(93995844); - model = BinaryData.fromObject(model).toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(1095681099, model.maxInstances()); - Assertions.assertEquals(1317358877, model.minInstances()); - Assertions.assertEquals(Duration.parse("PT10H14M39S"), model.pollingInterval()); - Assertions.assertEquals(93995844, model.targetUtilizationPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java deleted file mode 100644 index 12ea722ac887a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import org.junit.jupiter.api.Assertions; - -public final class TensorFlowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TensorFlow model = - BinaryData - .fromString( - "{\"distributionType\":\"TensorFlow\",\"parameterServerCount\":1873881024,\"workerCount\":131974478}") - .toObject(TensorFlow.class); - Assertions.assertEquals(1873881024, model.parameterServerCount()); - Assertions.assertEquals(131974478, model.workerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TensorFlow model = new TensorFlow().withParameterServerCount(1873881024).withWorkerCount(131974478); - model = BinaryData.fromObject(model).toObject(TensorFlow.class); - Assertions.assertEquals(1873881024, model.parameterServerCount()); - Assertions.assertEquals(131974478, model.workerCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java deleted file mode 100644 index 04eaf93fc5416..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassificationMultilabel model = - BinaryData - .fromString( - "{\"taskType\":\"TextClassificationMultilabel\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"klt\"},\"limitSettings\":{\"maxConcurrentTrials\":1366135748,\"maxTrials\":1224275689,\"timeout\":\"PT25H21M12S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"grdcgubsrtmdy\",\"description\":\"erpi\"},\"logVerbosity\":\"Warning\",\"targetColumnName\":\"zgczfcmfpfbode\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"sr\",\"description\":\"tshuvftwaivm\"}}") - .toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("zgczfcmfpfbode", model.targetColumnName()); - Assertions.assertEquals("tshuvftwaivm", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("sr", model.trainingData().uri()); - Assertions.assertEquals("klt", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1366135748, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1224275689, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT25H21M12S"), model.limitSettings().timeout()); - Assertions.assertEquals("erpi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("grdcgubsrtmdy", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassificationMultilabel model = - new TextClassificationMultilabel() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("zgczfcmfpfbode") - .withTrainingData( - new MLTableJobInput() - .withDescription("tshuvftwaivm") - .withMode(InputDeliveryMode.DIRECT) - .withUri("sr")) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("klt")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1366135748) - .withMaxTrials(1224275689) - .withTimeout(Duration.parse("PT25H21M12S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("erpi") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("grdcgubsrtmdy")); - model = BinaryData.fromObject(model).toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("zgczfcmfpfbode", model.targetColumnName()); - Assertions.assertEquals("tshuvftwaivm", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("sr", model.trainingData().uri()); - Assertions.assertEquals("klt", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1366135748, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1224275689, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT25H21M12S"), model.limitSettings().timeout()); - Assertions.assertEquals("erpi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("grdcgubsrtmdy", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java deleted file mode 100644 index cc6b6e0733ab8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java +++ /dev/null @@ -1,79 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassification; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassification model = - BinaryData - .fromString( - "{\"taskType\":\"TextClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"tsffo\"},\"limitSettings\":{\"maxConcurrentTrials\":650758189,\"maxTrials\":560959800,\"timeout\":\"PT174H2M54S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"w\",\"description\":\"cgwdfriwgybjp\"},\"logVerbosity\":\"Warning\",\"targetColumnName\":\"scvgl\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"dgbyfgwewqkjvxp\",\"description\":\"pxsoohu\"}}") - .toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("scvgl", model.targetColumnName()); - Assertions.assertEquals("pxsoohu", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals("tsffo", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(650758189, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(560959800, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT174H2M54S"), model.limitSettings().timeout()); - Assertions.assertEquals("cgwdfriwgybjp", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("w", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassification model = - new TextClassification() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("scvgl") - .withTrainingData( - new MLTableJobInput() - .withDescription("pxsoohu") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("dgbyfgwewqkjvxp")) - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("tsffo")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(650758189) - .withMaxTrials(560959800) - .withTimeout(Duration.parse("PT174H2M54S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("cgwdfriwgybjp") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("w")); - model = BinaryData.fromObject(model).toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("scvgl", model.targetColumnName()); - Assertions.assertEquals("pxsoohu", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals("tsffo", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(650758189, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(560959800, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT174H2M54S"), model.limitSettings().timeout()); - Assertions.assertEquals("cgwdfriwgybjp", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("w", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java deleted file mode 100644 index 66c830fc80a6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java +++ /dev/null @@ -1,76 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextNer; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextNerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextNer model = - BinaryData - .fromString( - "{\"taskType\":\"TextNER\",\"primaryMetric\":\"PrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"zgjypanhxmpdxxz\"},\"limitSettings\":{\"maxConcurrentTrials\":1172972444,\"maxTrials\":1745453139,\"timeout\":\"PT16H13M18S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"lkfhglhrfoxqwec\",\"description\":\"nhpcselqx\"},\"logVerbosity\":\"Critical\",\"targetColumnName\":\"qibukklvzrl\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"ccmetjsczivfqb\",\"description\":\"asdsyenzsie\"}}") - .toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("qibukklvzrl", model.targetColumnName()); - Assertions.assertEquals("asdsyenzsie", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ccmetjsczivfqb", model.trainingData().uri()); - Assertions.assertEquals("zgjypanhxmpdxxz", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1172972444, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1745453139, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT16H13M18S"), model.limitSettings().timeout()); - Assertions.assertEquals("nhpcselqx", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lkfhglhrfoxqwec", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextNer model = - new TextNer() - .withLogVerbosity(LogVerbosity.CRITICAL) - .withTargetColumnName("qibukklvzrl") - .withTrainingData( - new MLTableJobInput() - .withDescription("asdsyenzsie") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("ccmetjsczivfqb")) - .withFeaturizationSettings( - new NlpVerticalFeaturizationSettings().withDatasetLanguage("zgjypanhxmpdxxz")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1172972444) - .withMaxTrials(1745453139) - .withTimeout(Duration.parse("PT16H13M18S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("nhpcselqx") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("lkfhglhrfoxqwec")); - model = BinaryData.fromObject(model).toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("qibukklvzrl", model.targetColumnName()); - Assertions.assertEquals("asdsyenzsie", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ccmetjsczivfqb", model.trainingData().uri()); - Assertions.assertEquals("zgjypanhxmpdxxz", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1172972444, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1745453139, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT16H13M18S"), model.limitSettings().timeout()); - Assertions.assertEquals("nhpcselqx", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lkfhglhrfoxqwec", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java deleted file mode 100644 index c92f459fe17f0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TrainingSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrainingSettings model = - BinaryData - .fromString( - "{\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT109H29M10S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datajtasbvwispk\",\"stackMetaLearnerTrainPercentage\":99.23936213293845,\"stackMetaLearnerType\":\"LogisticRegressionCV\"}}") - .toObject(TrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT109H29M10S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(99.23936213293845D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrainingSettings model = - new TrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT109H29M10S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datajtasbvwispk") - .withStackMetaLearnerTrainPercentage(99.23936213293845D) - .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION_CV)); - model = BinaryData.fromObject(model).toObject(TrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT109H29M10S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(99.23936213293845D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java deleted file mode 100644 index 5983c0e76c29c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java +++ /dev/null @@ -1,33 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import org.junit.jupiter.api.Assertions; - -public final class TriggerBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerBase model = - BinaryData - .fromString( - "{\"triggerType\":\"TriggerBase\",\"endTime\":\"plucfotangcfhnyk\",\"startTime\":\"ugswvx\",\"timeZone\":\"mzqwmvtxnjmxmcu\"}") - .toObject(TriggerBase.class); - Assertions.assertEquals("plucfotangcfhnyk", model.endTime()); - Assertions.assertEquals("ugswvx", model.startTime()); - Assertions.assertEquals("mzqwmvtxnjmxmcu", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerBase model = - new TriggerBase().withEndTime("plucfotangcfhnyk").withStartTime("ugswvx").withTimeZone("mzqwmvtxnjmxmcu"); - model = BinaryData.fromObject(model).toObject(TriggerBase.class); - Assertions.assertEquals("plucfotangcfhnyk", model.endTime()); - Assertions.assertEquals("ugswvx", model.startTime()); - Assertions.assertEquals("mzqwmvtxnjmxmcu", model.timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java deleted file mode 100644 index e2370f8f1842e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"triton_model\",\"mode\":\"Download\",\"uri\":\"plhyvd\",\"description\":\"lyzkxitds\"}") - .toObject(TritonModelJobInput.class); - Assertions.assertEquals("lyzkxitds", model.description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); - Assertions.assertEquals("plhyvd", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobInput model = - new TritonModelJobInput() - .withDescription("lyzkxitds") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("plhyvd"); - model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class); - Assertions.assertEquals("lyzkxitds", model.description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); - Assertions.assertEquals("plhyvd", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java deleted file mode 100644 index 55fbe2e470fec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"triton_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"vkolrupjovmo\",\"description\":\"ayeb\"}") - .toObject(TritonModelJobOutput.class); - Assertions.assertEquals("ayeb", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("vkolrupjovmo", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobOutput model = - new TritonModelJobOutput() - .withDescription("ayeb") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("vkolrupjovmo"); - model = BinaryData.fromObject(model).toObject(TritonModelJobOutput.class); - Assertions.assertEquals("ayeb", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("vkolrupjovmo", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java deleted file mode 100644 index 904af93fa3557..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java +++ /dev/null @@ -1,36 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TruncationSelectionPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TruncationSelectionPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"TruncationSelection\",\"truncationPercentage\":1106944697,\"delayEvaluation\":674073421,\"evaluationInterval\":1924509674}") - .toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(674073421, model.delayEvaluation()); - Assertions.assertEquals(1924509674, model.evaluationInterval()); - Assertions.assertEquals(1106944697, model.truncationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TruncationSelectionPolicy model = - new TruncationSelectionPolicy() - .withDelayEvaluation(674073421) - .withEvaluationInterval(1924509674) - .withTruncationPercentage(1106944697); - model = BinaryData.fromObject(model).toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(674073421, model.delayEvaluation()); - Assertions.assertEquals(1924509674, model.evaluationInterval()); - Assertions.assertEquals(1106944697, model.truncationPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java deleted file mode 100644 index acdc83131e6c3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; - -public final class UpdateWorkspaceQuotasResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"dxwzywqsmbsurexi\",\"type\":\"ryocfsfksymdd\",\"limit\":2863300785135771862,\"unit\":\"Count\",\"status\":\"OperationNotSupportedForSku\"},{\"id\":\"qyud\",\"type\":\"rrqnbpoczvyifqrv\",\"limit\":4225896230813201107,\"unit\":\"Count\",\"status\":\"Undefined\"},{\"id\":\"vvdfwatkpnpul\",\"type\":\"xbczwtruwiqz\",\"limit\":535203573928767895,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"okacspk\",\"type\":\"hzdobpxjmflbvvnc\",\"limit\":5158769929678256713,\"unit\":\"Count\",\"status\":\"Failure\"}],\"nextLink\":\"juqk\"}") - .toObject(UpdateWorkspaceQuotasResultInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = new UpdateWorkspaceQuotasResultInner(); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotasResultInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java deleted file mode 100644 index 4b480a366fbf9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Status; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import org.junit.jupiter.api.Assertions; - -public final class UpdateWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotas model = - BinaryData - .fromString( - "{\"id\":\"sa\",\"type\":\"wkuofoskghsauu\",\"limit\":6549860277400431394,\"unit\":\"Count\",\"status\":\"Failure\"}") - .toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(6549860277400431394L, model.limit()); - Assertions.assertEquals(Status.FAILURE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotas model = - new UpdateWorkspaceQuotas().withLimit(6549860277400431394L).withStatus(Status.FAILURE); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(6549860277400431394L, model.limit()); - Assertions.assertEquals(Status.FAILURE, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java deleted file mode 100644 index d99e7f294cc1b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java +++ /dev/null @@ -1,58 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFileDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileDataVersion model = - BinaryData - .fromString( - "{\"dataType\":\"uri_file\",\"dataUri\":\"zbtz\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"pfs\",\"properties\":{\"ezacfpztga\":\"pfnocm\",\"ctgkppgkqzkcyzmf\":\"wyqejgaao\"},\"tags\":{\"hlcqvhoe\":\"dyfcix\",\"mkahpqha\":\"goiutgw\",\"mip\":\"yntacihnco\",\"i\":\"mliqmvlb\"}}") - .toObject(UriFileDataVersion.class); - Assertions.assertEquals("pfs", model.description()); - Assertions.assertEquals("pfnocm", model.properties().get("ezacfpztga")); - Assertions.assertEquals("dyfcix", model.tags().get("hlcqvhoe")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("zbtz", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileDataVersion model = - new UriFileDataVersion() - .withDescription("pfs") - .withProperties(mapOf("ezacfpztga", "pfnocm", "ctgkppgkqzkcyzmf", "wyqejgaao")) - .withTags(mapOf("hlcqvhoe", "dyfcix", "mkahpqha", "goiutgw", "mip", "yntacihnco", "i", "mliqmvlb")) - .withIsAnonymous(true) - .withIsArchived(true) - .withDataUri("zbtz"); - model = BinaryData.fromObject(model).toObject(UriFileDataVersion.class); - Assertions.assertEquals("pfs", model.description()); - Assertions.assertEquals("pfnocm", model.properties().get("ezacfpztga")); - Assertions.assertEquals("dyfcix", model.tags().get("hlcqvhoe")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("zbtz", model.dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java deleted file mode 100644 index a0df6aaca2b71..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java +++ /dev/null @@ -1,34 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"uri_file\",\"mode\":\"ReadOnlyMount\",\"uri\":\"qgrvg\",\"description\":\"mxpu\"}") - .toObject(UriFileJobInput.class); - Assertions.assertEquals("mxpu", model.description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("qgrvg", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobInput model = - new UriFileJobInput().withDescription("mxpu").withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("qgrvg"); - model = BinaryData.fromObject(model).toObject(UriFileJobInput.class); - Assertions.assertEquals("mxpu", model.description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("qgrvg", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java deleted file mode 100644 index 60c97ca9dc200..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java +++ /dev/null @@ -1,34 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"uri_file\",\"mode\":\"Upload\",\"uri\":\"dfj\",\"description\":\"esocwiqbuou\"}") - .toObject(UriFileJobOutput.class); - Assertions.assertEquals("esocwiqbuou", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("dfj", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobOutput model = - new UriFileJobOutput().withDescription("esocwiqbuou").withMode(OutputDeliveryMode.UPLOAD).withUri("dfj"); - model = BinaryData.fromObject(model).toObject(UriFileJobOutput.class); - Assertions.assertEquals("esocwiqbuou", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("dfj", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java deleted file mode 100644 index 6d354ce0c424a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderDataVersion model = - BinaryData - .fromString( - "{\"dataType\":\"uri_folder\",\"dataUri\":\"mpyzgleo\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"wwzvdaj\",\"properties\":{\"fmaciqgjjrlhiq\":\"n\",\"jtt\":\"wixvtbouguxtndop\",\"bkixvvlwyn\":\"asualapdlndbea\",\"qvzfj\":\"bb\"},\"tags\":{\"mphfkyezolgjzm\":\"ugzfeuzjl\"}}") - .toObject(UriFolderDataVersion.class); - Assertions.assertEquals("wwzvdaj", model.description()); - Assertions.assertEquals("n", model.properties().get("fmaciqgjjrlhiq")); - Assertions.assertEquals("ugzfeuzjl", model.tags().get("mphfkyezolgjzm")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("mpyzgleo", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderDataVersion model = - new UriFolderDataVersion() - .withDescription("wwzvdaj") - .withProperties( - mapOf( - "fmaciqgjjrlhiq", - "n", - "jtt", - "wixvtbouguxtndop", - "bkixvvlwyn", - "asualapdlndbea", - "qvzfj", - "bb")) - .withTags(mapOf("mphfkyezolgjzm", "ugzfeuzjl")) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("mpyzgleo"); - model = BinaryData.fromObject(model).toObject(UriFolderDataVersion.class); - Assertions.assertEquals("wwzvdaj", model.description()); - Assertions.assertEquals("n", model.properties().get("fmaciqgjjrlhiq")); - Assertions.assertEquals("ugzfeuzjl", model.tags().get("mphfkyezolgjzm")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("mpyzgleo", model.dataUri()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java deleted file mode 100644 index b1e8226f6f181..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"uri_folder\",\"mode\":\"EvalMount\",\"uri\":\"ydoccnxshanzb\",\"description\":\"adh\"}") - .toObject(UriFolderJobInput.class); - Assertions.assertEquals("adh", model.description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.mode()); - Assertions.assertEquals("ydoccnxshanzb", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobInput model = - new UriFolderJobInput() - .withDescription("adh") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("ydoccnxshanzb"); - model = BinaryData.fromObject(model).toObject(UriFolderJobInput.class); - Assertions.assertEquals("adh", model.description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.mode()); - Assertions.assertEquals("ydoccnxshanzb", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java deleted file mode 100644 index 7511a7ec6d454..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java +++ /dev/null @@ -1,37 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"uri_folder\",\"mode\":\"ReadWriteMount\",\"uri\":\"caatsdohzniucbda\",\"description\":\"b\"}") - .toObject(UriFolderJobOutput.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("caatsdohzniucbda", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobOutput model = - new UriFolderJobOutput() - .withDescription("b") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("caatsdohzniucbda"); - model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("caatsdohzniucbda", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java deleted file mode 100644 index dc5abc4da1a03..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = - BinaryData - .fromString( - "{\"id\":\"al\",\"amlWorkspaceLocation\":\"wsubisnja\",\"type\":\"mngnzscxaqw\",\"unit\":\"Count\",\"currentValue\":8284849522775064668,\"limit\":4293534997392812714,\"name\":{\"value\":\"kvlrxnj\",\"localizedValue\":\"seiphe\"}}") - .toObject(UsageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner(); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java deleted file mode 100644 index 51468bd4dbf33..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UsageName; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model = - BinaryData.fromString("{\"value\":\"lokeyy\",\"localizedValue\":\"nj\"}").toObject(UsageName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName(); - model = BinaryData.fromObject(model).toObject(UsageName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java deleted file mode 100644 index 11d6eafc68b83..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java +++ /dev/null @@ -1,64 +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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Usage; -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 UsagesListMockTests { - @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\":[{\"id\":\"dxku\",\"amlWorkspaceLocation\":\"kczynuhhoqeqsh\",\"type\":\"ljqkxyrqolnthbb\",\"unit\":\"Count\",\"currentValue\":6327166092096941565,\"limit\":45876676244603547,\"name\":{\"value\":\"kjthfce\",\"localizedValue\":\"ncjmlfuyf\"}}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("aaxoialahfxwcc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 9233f673cb974..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"482ca507-d71f-4817-b618-8233dec4afc2\",\"clientId\":\"08c17000-9968-4d5e-b89a-5cd50023b58b\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java deleted file mode 100644 index a6544cd230123..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserIdentity; - -public final class UserIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentity model = BinaryData.fromString("{\"identityType\":\"UserIdentity\"}").toObject(UserIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity(); - model = BinaryData.fromObject(model).toObject(UserIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java deleted file mode 100644 index d5961556e5fd4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java +++ /dev/null @@ -1,25 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineImage model = - BinaryData.fromString("{\"id\":\"vbopfppdbwnu\"}").toObject(VirtualMachineImage.class); - Assertions.assertEquals("vbopfppdbwnu", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineImage model = new VirtualMachineImage().withId("vbopfppdbwnu"); - model = BinaryData.fromObject(model).toObject(VirtualMachineImage.class); - Assertions.assertEquals("vbopfppdbwnu", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java deleted file mode 100644 index 9f29c5acc8d01..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java +++ /dev/null @@ -1,62 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSizeListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"tgrhpdjpjumas\",\"family\":\"zj\",\"vCPUs\":1063088657,\"gpus\":973371108,\"osVhdSizeMB\":1267309720,\"maxResourceVolumeMB\":285130790,\"memoryGB\":62.19358841158077,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"dgwdslfhot\",\"mcy\",\"pwlbjnpg\"]},{\"name\":\"ftadehxnltyfs\",\"family\":\"pusuesn\",\"vCPUs\":1828932864,\"gpus\":317621756,\"osVhdSizeMB\":600821678,\"maxResourceVolumeMB\":1696341054,\"memoryGB\":51.36310108881028,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"udwxdndnvowguj\",\"ugw\"]},{\"name\":\"cglhslazjdyggdt\",\"family\":\"xhbkuofq\",\"vCPUs\":358956997,\"gpus\":1965159297,\"osVhdSizeMB\":1807410645,\"maxResourceVolumeMB\":1520793095,\"memoryGB\":45.72291424975317,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"bvyvdcsity\"]}]}") - .toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals("dgwdslfhot", model.value().get(0).supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSizeListResultInner model = - new VirtualMachineSizeListResultInner() - .withValue( - Arrays - .asList( - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("dgwdslfhot", "mcy", "pwlbjnpg")), - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("udwxdndnvowguj", "ugw")), - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("bvyvdcsity")))); - model = BinaryData.fromObject(model).toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals("dgwdslfhot", model.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java deleted file mode 100644 index cf90d3601f44b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSize model = - BinaryData - .fromString( - "{\"name\":\"aamdect\",\"family\":\"f\",\"vCPUs\":1860942440,\"gpus\":993666965,\"osVhdSizeMB\":230831104,\"maxResourceVolumeMB\":796129419,\"memoryGB\":78.8172659538708,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":43.63741417101916,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":10.488278430863074,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":12.69677181728943,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":38.22056349066922,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"pkc\",\"t\",\"pngjcrcczsqpjhvm\"]}") - .toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(43.63741417101916, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("pkc", model.supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSize model = - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues( - Arrays - .asList( - new EstimatedVMPrice() - .withRetailPrice(43.63741417101916) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice() - .withRetailPrice(10.488278430863074) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice() - .withRetailPrice(12.69677181728943) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice() - .withRetailPrice(38.22056349066922) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("pkc", "t", "pngjcrcczsqpjhvm")); - model = BinaryData.fromObject(model).toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(43.63741417101916, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("pkc", model.supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java deleted file mode 100644 index 8669b4c6f1477..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -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 VirtualMachineSizesListWithResponseMockTests { - @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\":[{\"name\":\"mq\",\"family\":\"uiocuselqkrsazr\",\"vCPUs\":907855670,\"gpus\":162147994,\"osVhdSizeMB\":1160671233,\"maxResourceVolumeMB\":1893332175,\"memoryGB\":44.634673287925494,\"lowPriorityCapable\":false,\"premiumIO\":true,\"supportedComputeTypes\":[\"mw\",\"mdlgy\",\"ixokwtjawhv\",\"gnqfqqdlcvmyol\"]},{\"name\":\"ymjc\",\"family\":\"vsnvlaq\",\"vCPUs\":4380351,\"gpus\":1268203688,\"osVhdSizeMB\":1622025421,\"maxResourceVolumeMB\":2099242028,\"memoryGB\":84.58306289880801,\"lowPriorityCapable\":true,\"premiumIO\":true,\"supportedComputeTypes\":[\"thymgobl\",\"msn\",\"gwi\"]}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualMachineSizeListResult response = - manager.virtualMachineSizes().listWithResponse("bpfiddhlrufz", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("mw", response.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java deleted file mode 100644 index 2222100f20485..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java +++ /dev/null @@ -1,30 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionManagedIdentity model = - BinaryData - .fromString("{\"resourceId\":\"ivensrpmeyyvpk\",\"clientId\":\"tlbijpzg\"}") - .toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("ivensrpmeyyvpk", model.resourceId()); - Assertions.assertEquals("tlbijpzg", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionManagedIdentity model = - new WorkspaceConnectionManagedIdentity().withResourceId("ivensrpmeyyvpk").withClientId("tlbijpzg"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("ivensrpmeyyvpk", model.resourceId()); - Assertions.assertEquals("tlbijpzg", model.clientId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java deleted file mode 100644 index 67d94947eea1b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java +++ /dev/null @@ -1,26 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPersonalAccessTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = - BinaryData.fromString("{\"pat\":\"phuuuerctato\"}").toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("phuuuerctato", model.pat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = - new WorkspaceConnectionPersonalAccessToken().withPat("phuuuerctato"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("phuuuerctato", model.pat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java deleted file mode 100644 index a275c7a557c9d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,51 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"PythonFeed\",\"target\":\"yqsemwa\",\"value\":\"ets\",\"valueFormat\":\"JSON\"},\"id\":\"h\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}],\"nextLink\":\"k\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.value().get(0).properties().category()); - Assertions.assertEquals("yqsemwa", model.value().get(0).properties().target()); - Assertions.assertEquals("ets", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = - new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new WorkspaceConnectionPropertiesV2BasicResourceInner() - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("yqsemwa") - .withValue("ets") - .withValueFormat(ValueFormat.JSON)))); - model = - BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.value().get(0).properties().category()); - Assertions.assertEquals("yqsemwa", model.value().get(0).properties().target()); - Assertions.assertEquals("ets", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java deleted file mode 100644 index be9c021e2284b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"wiydmcwyhzdxssad\",\"value\":\"mnvdfzn\",\"valueFormat\":\"JSON\"},\"id\":\"dvxzbncblylpst\",\"name\":\"bhhxsrzdzuc\",\"type\":\"rsc\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, model.properties().category()); - Assertions.assertEquals("wiydmcwyhzdxssad", model.properties().target()); - Assertions.assertEquals("mnvdfzn", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model = - new WorkspaceConnectionPropertiesV2BasicResourceInner() - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("wiydmcwyhzdxssad") - .withValue("mnvdfzn") - .withValueFormat(ValueFormat.JSON)); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, model.properties().category()); - Assertions.assertEquals("wiydmcwyhzdxssad", model.properties().target()); - Assertions.assertEquals("mnvdfzn", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java deleted file mode 100644 index 2c2c30c1704ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = - BinaryData - .fromString( - "{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"PythonFeed\",\"target\":\"evfiwjmygt\",\"value\":\"slswtm\",\"valueFormat\":\"JSON\"}") - .toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.category()); - Assertions.assertEquals("evfiwjmygt", model.target()); - Assertions.assertEquals("slswtm", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("evfiwjmygt") - .withValue("slswtm") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.category()); - Assertions.assertEquals("evfiwjmygt", model.target()); - Assertions.assertEquals("slswtm", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java deleted file mode 100644 index bdf2992d956de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java +++ /dev/null @@ -1,28 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionSharedAccessSignatureTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = - BinaryData - .fromString("{\"sas\":\"uczkgofxyfsruc\"}") - .toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("uczkgofxyfsruc", model.sas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = - new WorkspaceConnectionSharedAccessSignature().withSas("uczkgofxyfsruc"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("uczkgofxyfsruc", model.sas()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java deleted file mode 100644 index 14485908f4c21..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -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 WorkspaceConnectionsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"zuzhasup\",\"value\":\"p\",\"valueFormat\":\"JSON\"},\"id\":\"zvzqazvbkark\",\"name\":\"tgongrua\",\"type\":\"s\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = - manager - .workspaceConnections() - .define("rwqirvtktyhhmvf") - .withExistingWorkspace("ouigdmfivjqte", "dqqigdydkghpc") - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("jajodmkrr") - .withValue("pgqvqo") - .withValueFormat(ValueFormat.JSON)) - .create(); - - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, response.properties().category()); - Assertions.assertEquals("zuzhasup", response.properties().target()); - Assertions.assertEquals("p", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index a777528a8091f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.machinelearning.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.machinelearning.MachineLearningManager; -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 WorkspaceConnectionsDeleteWithResponseMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workspaceConnections() - .deleteWithResponse("paczmuh", "cakznhokhoitwhrj", "dmmazdnc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 2cf32122e8280..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -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 WorkspaceConnectionsGetWithResponseMockTests { - @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\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"gzhogsmgbvmtd\",\"value\":\"qbe\",\"valueFormat\":\"JSON\"},\"id\":\"veglabtvkbiwzn\",\"name\":\"tfgfic\",\"type\":\"dyhi\"}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = - manager - .workspaceConnections() - .getWithResponse("ekymffztsilscvqs", "eiihfymko", "ihyeseu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, response.properties().category()); - Assertions.assertEquals("gzhogsmgbvmtd", response.properties().target()); - Assertions.assertEquals("qbe", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java deleted file mode 100644 index 741984a8bacd5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -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 WorkspaceConnectionsListMockTests { - @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\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Git\",\"target\":\"wh\",\"value\":\"xsure\",\"valueFormat\":\"JSON\"},\"id\":\"hzzbgullcxiqq\",\"name\":\"jkoxdupna\",\"type\":\"gl\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workspaceConnections() - .list("idb", "pglhzqp", "zbawkikcdgfh", "ssdpjeyoqxded", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ConnectionCategory.GIT, response.iterator().next().properties().category()); - Assertions.assertEquals("wh", response.iterator().next().properties().target()); - Assertions.assertEquals("xsure", response.iterator().next().properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.iterator().next().properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java deleted file mode 100644 index 3bcd57ce35a5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; -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 WorkspaceFeaturesListMockTests { - @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\":[{\"id\":\"kekzouyveww\",\"displayName\":\"rd\",\"description\":\"gldohgcandxfhh\"}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workspaceFeatures().list("wbmwdukinhl", "hg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kekzouyveww", response.iterator().next().id()); - Assertions.assertEquals("rd", response.iterator().next().displayName()); - Assertions.assertEquals("gldohgcandxfhh", response.iterator().next().description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java deleted file mode 100644 index e359ec0f65d2d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java +++ /dev/null @@ -1,56 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePropertiesUpdateParameters model = - BinaryData - .fromString( - "{\"description\":\"qfou\",\"friendlyName\":\"mmnkzsmodmgl\",\"imageBuildCompute\":\"gpbkwtmut\",\"serviceManagedResourcesSettings\":{\"cosmosDb\":{\"collectionsThroughput\":289494577}},\"primaryUserAssignedIdentity\":\"pspwgcuertu\",\"publicNetworkAccess\":\"Disabled\",\"applicationInsights\":\"svqwhbmdgbbjfd\",\"containerRegistry\":\"mbmbexppbh\"}") - .toObject(WorkspacePropertiesUpdateParameters.class); - Assertions.assertEquals("qfou", model.description()); - Assertions.assertEquals("mmnkzsmodmgl", model.friendlyName()); - Assertions.assertEquals("gpbkwtmut", model.imageBuildCompute()); - Assertions.assertEquals(289494577, model.serviceManagedResourcesSettings().cosmosDb().collectionsThroughput()); - Assertions.assertEquals("pspwgcuertu", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.applicationInsights()); - Assertions.assertEquals("mbmbexppbh", model.containerRegistry()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePropertiesUpdateParameters model = - new WorkspacePropertiesUpdateParameters() - .withDescription("qfou") - .withFriendlyName("mmnkzsmodmgl") - .withImageBuildCompute("gpbkwtmut") - .withServiceManagedResourcesSettings( - new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(289494577))) - .withPrimaryUserAssignedIdentity("pspwgcuertu") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withApplicationInsights("svqwhbmdgbbjfd") - .withContainerRegistry("mbmbexppbh"); - model = BinaryData.fromObject(model).toObject(WorkspacePropertiesUpdateParameters.class); - Assertions.assertEquals("qfou", model.description()); - Assertions.assertEquals("mmnkzsmodmgl", model.friendlyName()); - Assertions.assertEquals("gpbkwtmut", model.imageBuildCompute()); - Assertions.assertEquals(289494577, model.serviceManagedResourcesSettings().cosmosDb().collectionsThroughput()); - Assertions.assertEquals("pspwgcuertu", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.applicationInsights()); - Assertions.assertEquals("mbmbexppbh", model.containerRegistry()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java deleted file mode 100644 index 1a2853961942f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java +++ /dev/null @@ -1,104 +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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceUpdateParameters model = - BinaryData - .fromString( - "{\"tags\":{\"yqduujit\":\"mgxsab\",\"rwpdappdsbdkvwrw\":\"jczdzevndh\"},\"sku\":{\"name\":\"eusnhutj\",\"tier\":\"Premium\",\"size\":\"rl\",\"family\":\"ugjzzdatqxhocdge\",\"capacity\":1293628182},\"identity\":{\"principalId\":\"1766dab0-b6cc-422f-8a7a-5b439fec6fab\",\"tenantId\":\"31064613-1bc8-43cc-a67e-db3b41e6f75c\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"dvkaozw\":{\"principalId\":\"47285ad5-2fb1-4802-9800-ef15b64c9005\",\"clientId\":\"3461706a-d43b-4f70-a1e5-f37623e988fb\"},\"tyhxhurokft\":{\"principalId\":\"141163eb-a84e-4057-876d-ef2ca332a35a\",\"clientId\":\"61aace7e-3ef4-41e3-a5f3-cb34b3814d76\"},\"lniwpwcukjfkgiaw\":{\"principalId\":\"d961710b-4bea-4db4-ae21-054935aa3b87\",\"clientId\":\"52a95018-46dd-4fa9-860b-f8dafc12a373\"},\"ryplwckbasyypn\":{\"principalId\":\"14d938eb-6659-4bd4-b080-10c086f54a8e\",\"clientId\":\"a92d70a9-dbe7-4b71-a2b5-0096f3797152\"}}},\"properties\":{\"description\":\"sgcbac\",\"friendlyName\":\"ejk\",\"imageBuildCompute\":\"ynqgoulzndlikwyq\",\"serviceManagedResourcesSettings\":{},\"primaryUserAssignedIdentity\":\"ibmadgakeqsrxy\",\"publicNetworkAccess\":\"Disabled\",\"applicationInsights\":\"e\",\"containerRegistry\":\"ytb\"}}") - .toObject(WorkspaceUpdateParameters.class); - Assertions.assertEquals("mgxsab", model.tags().get("yqduujit")); - Assertions.assertEquals("eusnhutj", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("rl", model.sku().size()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.sku().family()); - Assertions.assertEquals(1293628182, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("sgcbac", model.description()); - Assertions.assertEquals("ejk", model.friendlyName()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.imageBuildCompute()); - Assertions.assertEquals("ibmadgakeqsrxy", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("e", model.applicationInsights()); - Assertions.assertEquals("ytb", model.containerRegistry()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceUpdateParameters model = - new WorkspaceUpdateParameters() - .withTags(mapOf("yqduujit", "mgxsab", "rwpdappdsbdkvwrw", "jczdzevndh")) - .withSku( - new Sku() - .withName("eusnhutj") - .withTier(SkuTier.PREMIUM) - .withSize("rl") - .withFamily("ugjzzdatqxhocdge") - .withCapacity(1293628182)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "dvkaozw", - new UserAssignedIdentity(), - "tyhxhurokft", - new UserAssignedIdentity(), - "lniwpwcukjfkgiaw", - new UserAssignedIdentity(), - "ryplwckbasyypn", - new UserAssignedIdentity()))) - .withDescription("sgcbac") - .withFriendlyName("ejk") - .withImageBuildCompute("ynqgoulzndlikwyq") - .withServiceManagedResourcesSettings(new ServiceManagedResourcesSettings()) - .withPrimaryUserAssignedIdentity("ibmadgakeqsrxy") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withApplicationInsights("e") - .withContainerRegistry("ytb"); - model = BinaryData.fromObject(model).toObject(WorkspaceUpdateParameters.class); - Assertions.assertEquals("mgxsab", model.tags().get("yqduujit")); - Assertions.assertEquals("eusnhutj", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("rl", model.sku().size()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.sku().family()); - Assertions.assertEquals(1293628182, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("sgcbac", model.description()); - Assertions.assertEquals("ejk", model.friendlyName()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.imageBuildCompute()); - Assertions.assertEquals("ibmadgakeqsrxy", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("e", model.applicationInsights()); - Assertions.assertEquals("ytb", model.containerRegistry()); - } - - @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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java deleted file mode 100644 index da29450819255..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 WorkspacesDeleteMockTests { - @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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().delete("f", "huwzbxpcqzgi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java deleted file mode 100644 index e7f07d55c9f21..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -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 WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{}]}"; - - 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExternalFqdnResponse response = - manager - .workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "ffffg", "uhznwhvuldbk", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java deleted file mode 100644 index 3b0b7388c4bda..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -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 WorkspacesResyncKeysMockTests { - @Test - public void testResyncKeys() 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); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().resyncKeys("ygzqpjoisfmn", "ybdjnxumentq", com.azure.core.util.Context.NONE); - } -}